current_users = ['a', 'C', 'D', 't', 'u']
new_users = ['d', 'k', 'i', 'T']
i = 0
for current_user in current_users:
current_users.pop(i)
i = i + 1
current_users.insert(0, current_user.lower())
print(current_users) # 这里用来检查列表元素是否都变为小写
for new_user in new_users:
if new_user.lower() in current_users:
message = " sorry, you can't use this username!\n"
else:
message = " ok, you can use this username!\n"
print(new_user + message)
Python小白 (o)/,望指正