def print_friend_and_save(friend): neo.add_friend(friend) global c global total c += 1 print(c, end='/') print(total, end='\t') print(friend.name)
def print_friend_and_save_wlist(friend): global friends neo.add_friend(friend) friends.append(friend) global total global c c += 1 print(c, end='/') print(total, end='\t') print(friend.name)