Trying out Python here and I have question about the use of functions on lists. I`m currently running into trouble with an assignment to check new usernames against current users. What I want to do is change the values in the list to lower cases so that if a new user "Kim" is not accepted since there is a current user "kim". Here is my code:
new_users.lower() = ["Jeroen","naj","Kim","henk","ayla","nimda"]
current_users.lower() = ["Jeroen","jan","kim","henk","ayla","admin"]
for new_user in new_users:
if new_user in current_users:
print("\tHello, " + new_user + ". Please choose a different username")
else:
print("\nHello "+ new_user + " We accept your username. Welcome.")
Unfortunately Python gives me the following error: "can't assign to function call". But I have no idea what Python means with this. Why can`t I use a simple lowercase function on the values in a list before I check them in my for loop? Please explain / help.