sorry for the question title, I don't know how to word it. I coded a program that guessed your password by randomly generating passwords until it gets a match. you could only change the password by editing the code, I wanted to upgrade it and make it so you can type the password in the console and it guesses it but when I tried it had a bug. This is what happened: this is my code
letter=("a""b""c""1""2""3")
import random
print ("Please type a 6 character password with a, b, c, 1, 2, 3, you may use characters more than once.")
password = input
spam=(random.choice(letter)+""+random.choice(letter)+""+random.choice(letter)+""+random.choice(letter)+random.choice(letter)+""+random.choice(letter))
found = spam == password
if not found:
print(spam)
elif found:
print ("I found your password: " + spam)
but when I start the code this is what happens
Please type a 6 character password with a, b, c, 1, 2, 3, you may use characters more than once.
c1aca2
instead of just showing the instructions it shows a password combination. another issue it that when I type in the password and click enter I get a syntax error