I've noticed a very curious phenomenon here. I've instantiated a global variable (usrPIN
), and I'm comparing it to a local variable (c
). When I input a value (in this case, four zeros), the value is chopped off, creating a string that is one character long. Why?
usrPIN
...
def login():
global usrPIN
...
c = str(input("Enter PIN"))
print usrPIN
print str(c)
if usrPIN == c:
mainMenu()
else:
print "Incorrect PIN"
login()
What on earth is going on?