Advertisement
IsenfireLDC

Automate The Boring Stuff -- Chapter 0 Example

May 3rd, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. passwordFile = open('SecretPasswordFile.txt')
  2. secretPassword = passwordFile.read()
  3. print('Enter your password.')
  4.    typedPassword = input()
  5. if typedPassword == secretPassword:
  6.    print('Access granted')
  7.    if typedPassword == '12345':
  8.       print('That password is one that an idiot puts on their luggage.')
  9.   else:
  10.       print('Access denied')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement