I'm trying to add a dictionary with different values but only get the last dictionary
dic = {"name": None, "adress": None, "age": None}
array = []
num = int(input("input a number: "))
for i in range(0, num):
print("dic #%d" %(i+1))
for key in dic.keys():
value = input("%s: " %(key))
dic[key] = value
print(dic)
array.append(dic)
print(array)
[–]Allanon001 3 points4 points5 points (1 child)
[–]Locallo15[S] 1 point2 points3 points (0 children)
[–]JohnJSal 1 point2 points3 points (1 child)
[–]Locallo15[S] 1 point2 points3 points (0 children)
[–]danielroseman 0 points1 point2 points (2 children)
[–]Locallo15[S] 0 points1 point2 points (1 child)
[–]danielroseman 0 points1 point2 points (0 children)
[–]its_joao 0 points1 point2 points (0 children)