Hi, I've recently started to get into Python, and I've made a bit a progress
so far, but I still have a long way to go. Along my search for tutorials,
I've come across this:

# Waits until a password has been entered.  Use Control-C to break out without
# the password

#Note that this must not be the password so that the
# while loop runs at least once.
password = "foobar"

# note that != means not equal
while password != "unicorn":
    password = raw_input("Password: ")
print "Welcome in"



I understand *what's* going on, but I don't understand *why* it's happening.
To be more specific, I don't understand why the actual password, "unicorn",
is what it is, even though I set the password to "foobar"(password =
'foobar'), and later even stated that the password wasn't "unicorn"(while
password != 'unicorn':). Any help would be greatly appreciated. Thanks!
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to