#5-10检查用户名
current_users = [‘admin’, ‘newton’, ‘copernicus’, ‘napoleon’, ‘einstein’]
new_users = [‘admin’, ‘newton’, ‘schrodinger’, ‘beethoven’, ‘free’]
for users in new_users:
if users in current_users:
print(users.title() + ’ registration failed! The nickname already exists.')
else:
print(users.title() + ‘registration successful !’)
Python入门习题--5-10检查用户名
最新推荐文章于 2023-01-17 21:58:39 发布