if-else structure : If « Language Basics « Python
- Python
- Language Basics
- If
if-else structure

print "password please\n"
password = raw_input("Enter your password: ")
if password == "name":
print "Access Granted"
else:
print "Access Denied"
Related examples in the same category