题解 | #禁止重复注册#

禁止重复注册

https://www.nowcoder.com/practice/43acd439112c4b85a9168ad3dd7e2bd1

import sys

current_users = ['Niuniu','Niumei','GURR','LOLO']
new_users = ['GurR','Niu Ke Le','LoLo','Tuo Rui Chi']

current_users1 = [i.lower() for i in current_users]


for j in new_users:
        a = j.lower() in current_users1
        if a:
            print('The user name %s has already been registered! Please change it and try again!'%j)
        else:
            print('Congratulations, the user name %s is available!'%j)

全部评论

相关推荐

牛客52811839...:实习要写出来业务和产出,你这写的像流水账没人看。项目经历也没有,换个极简简历试试
点赞 评论 收藏
分享
要AC不要WA:投一天,喜提两笔试
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务