How do I check a user inputted name?

Viewed 47
input("Name: ")
if input == "Assafa":
    print("11")
else:
    print("Not found")

If I input the name "Assafa" I get this:

Name: Assafa
Not found
1 Answers

You need to set your input("Name: ") into a variable.

Example:

name = input("Name: ")
if name == "Assafa":
    print("11")
else:
    print("Not found")
Related