Jan-26-2018, 06:07 PM
Hello,
Im pretty new to python and programming and I need some help. I need to check if user name is already in usage by another one. That was good and I dealt with it pretty fast. But then I found that if new user name is "Mark" and current user name is "MARK" It says that it's all good and this user doesn't have to change the name, but that's wrong. How can I make it to say that user name needs to be changed? I just need to make sure that letter size doesn't matter in comparing these two. I'm really thankful for all help!
That's my code so far:
Im pretty new to python and programming and I need some help. I need to check if user name is already in usage by another one. That was good and I dealt with it pretty fast. But then I found that if new user name is "Mark" and current user name is "MARK" It says that it's all good and this user doesn't have to change the name, but that's wrong. How can I make it to say that user name needs to be changed? I just need to make sure that letter size doesn't matter in comparing these two. I'm really thankful for all help!
That's my code so far:
current_users = ['alex', 'zuzia', 'zoie', 'maciej', 'wiktor', 'MARK'] new_users = ['alex', 'monika', 'pawel', 'henryk', 'adam', 'Mark'] for new_user in new_users: if new_user in current_users: print("You need to change users name!") else: print("You dont have to choose diffrent users name!")