r/learnpython • • Jun 30 '22

help I'm new at python

id = input("enter your password: ") print(id == 369)

Why when I enter 369 in the console it displays false?

0 Upvotes

9 comments sorted by

View all comments

0

u/ChemistryUnusual5324 Jun 30 '22

id = input("enter your password: ") print(id == 369)

11

u/alexcwarren Jun 30 '22
id = input("enter your password: ")
print(id == "369")

Or you could convert your id input to an integer:

id = int(input("enter your password: "))
print(id == 369)