Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wrongpasswordlist = []
- number = 1
- while True:
- userpassword = raw_input("enter your password ")
- if userpassword == "j":
- print "This is the correct password"
- print "this was your wrong passwords", wrongpasswordlist
- break
- print "wrong password nmr", number
- number += 1
- wrongpasswordlist.append(userpassword)
- ofile = open('wrongpasswords.txt', 'w')
- for number, password in enumerate(wrongpasswordlist, 1):
- #ofile.write('wrong password nmr {} "{}"\n'.format(number, password))
- #ofile.write('wrong password nmr %d "%s"\n' % (number, password))
- ofile.write('wrong password nmr ' + str(number) + '"' + password + '"\n')
- ofile.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement