List of dictionaries
Week 2
dic_list = []
while True:
sel = int(input("press 1 to continue and press 2 to stop"))
if sel == 1:
print("adding in dictionary")
my_dict = {}
while True:
key = int(input("key: "))
val = input("value: ")
my_dict[key] = val
con = int(input("press 1 to continue and press 2 to stop"))
if con ==2:
print(" The End ")
break
dic_list.append(my_dict)
elif sel == 2:
print("end")
break
else:
print("you pick the wrong one")
break
print("This is the list you made: ",dic_list)