检查用户名
不允许新用户使用已存在的用户名
current_users=['admin','john','Peter','Windy','Eric']
new_users=['Zhang','John','Li','Windy','Eric']
#将列表中元素全部改为小写后,存储至列表中
for i in range(0,len(current_users)):
current_users[i]=current_users[i].lower()
#print(current_users)
for new_user in new_users:
if new_user.lower() in current_users:
print(new_user + " exists. You need to input another name.")
else:
print(new_user + " hasn't been used.")