检查用户名5-10
current_users = ['Tom', 'bob', 'Alice', 'zhangsan', 'Lisi', 'John']
new_users = ['zhangsan', 'tom', 'shabi', 'mahua', 'john']
for new_user in new_users:
cnt = 0
for cur_user in current_users:
if new_user.lower() != cur_user.lower():
cnt = cnt + 1
if cnt != len(current_users):
print("The name " + new_user + " has been used, please enter another name you like")
else:
print("The name " + new_user + " has not been used.")
 guests = ['luo', 'ao', 'zeng', 'ye', 'xie', 'admin']
for guest in guests:
print(guest)
del guests[0]
print(guests)
05-08 15:30