Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dictionary = {}
- with open("password.txt") as file:
- for line in file:
- e, p = line.strip().split(", ")
- dictionary[e] = p
- email = input("Enter email: ")
- password = input("Enter new password: ")
- dictionary[email] = password
- with open("password.txt","w") as file:
- for e,p in dictionary.items():
- print(e,p,sep=", ",file=file)
- you@example.com, old_password
- noone@example.com, uzt(647zt2(/r
- lastone@email.com, zzzzzappp!
- youtoo@example.com, password
- xkcd@example.com, ok horse battery staple
- weall@example.com, topsecret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement