jeudi 25 février 2021

Why is this code returning the else statement not the if statement? [closed]

l_name = input("Enter last name: ")  ***User input was carl***


if  l_name.lower() <= "c":

    print ("Welcome to the a, b, c line")

else:

    print ("Sorry, this is the a, b, c line")

Why is "carl" as input returning the else statement when carl is equal to c?

Aucun commentaire:

Enregistrer un commentaire