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

4

u/Waldlaeufer18 Jun 30 '22

As said ID is a string, but to say it clearly input()outputs are always strings, if you want to have any other type you need to use float(), list() or any other "type-changer" on the output.