Sorry for the late post!
RESOURCES: Class slides: https://docs.google.com/presentation/d/1yrk3igZ4omIMSG75CpmHoTUfd76rVysXkWosLrgmK_Q/edit?usp=sharing HOMEWORK / MINI-PROJECT: Write a program that acts as a basic "password manager." The program should store passwords for several different services and be able to set or retrieve passwords. For instance, "get google.com" should return the current password set for "google.com," and "set google.com xyz" would set the password for "google.com" as "xyz." Write your answer as a comment, and feel free to email the TAs (Shravya and Eric) if you're stuck. See you on Tuesday!
Solution
dict={}
while 1:
action = input()
action=action.split()
if len(action) == 3:
dict[action[1]] = action[2]
elif len(action) == 2:
print(dict[action[1]])