Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I need some help
#1
[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..
Reply
#2
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:
Recommended Tutorials:
Reply
#3
thank you.
Reply
#4
Also, you can use getpass function from standard module getpass.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020