I'm learning some python in these days so I'm a beginner, I have a list with "current_users", and a list with "new_users", I want that no usernames must be repeated, so if a username (ex. John) is both in current_users and new_users, the program prints "Change your username", however the problem is that if new_users has "John" and current_users "JOHN", the program doesn't print that string since it considers them 2 different usernames, I've already tried to lower the names in new_users using .lower(), but I don't know how to do the same with current ones
current_users = ["Carlo", "carla", "FRANCESCO", "giacomo"]
new_users = ["carlo", "Francesco", "luca", "gabriele"]
for new in new_users:
if new.lower() in current_users:
print("Change your username")
else:
print("Welcome!")
I expect the program to output "Change your username" for each name that has already been used