I am trying to learn python. Just downloaded the latest version and trying to figure out how to use dictionary if I am not importing the data. If I wanted to have a user enter their first and last name, and how old they are- is there a way to keep asking the user to input the values, and have the dictionary automatically assign a key? for example-
inputs:Homer Simpson, age 43 - Mr. Burns 82, Ned Flanders 43 output: 1(key) Homer Simpson 43 2 Mr. Burns 82 3 Ned Flanders 43 name=[] age=[] dict1=[] while True: lastName=input('Please enter name or done to exit: ') age=input('Please enter age: ') if lastName!='done': dict1.append({string:name+ age}) else: print(dict1) break