Hello. I want to figure out if there are anther ways to create such kind of dictionary (user input):
d ={'Jane': [20, 1.7],
'Jack': [15, 1.8],
'John': [12, 1.5],
--------------
a lot of line
-------------- }
thanks in advance
d ={'Jane': [20, 1.7],
'Jack': [15, 1.8],
'John': [12, 1.5],
--------------
a lot of line
-------------- }
thanks in advance
d = {} L = [] i = 0 while i < 10: name = input('Enter your Name :') age = eval(input('Input your age :')) height = eval(input('Input your height :')) L.append(age) L.append(height) d[name] = L L = [] i+=1 print(d)