Python Forum
I need some help - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: I need some help (/thread-15944.html)



I need some help - SrTiNx - Feb-07-2019

[print("You need the password!")
input(Press any button to move on!)

password = ["123456789"]
x = input()
if x in password:
print("The password is correct")
else:
print("The password is incorrect")

what is wrong here ^^^^
i want to make a simple login system..


RE: I need some help - metulburr - Feb-07-2019

Please use python tags to preserve indentation. You need to tell us what your expected outcome is suppose to be.
Dont use a list and dont use the in operator?
password = '123456789'
if x == password:



RE: I need some help - SrTiNx - Feb-07-2019

thank you.


RE: I need some help - scidam - Feb-07-2019

Also, you can use getpass function from standard module getpass.