Students database for name and ID

Hi. i am trying to create a program in python 3 where it will ask the user to input the students name(name) and his/hers ID numbers(ID) all in one go separated by comma. Then present all the dictionary values in the following format eg:
Name:John ID:123
Name:Mary ID:234
Name:Eve ID:345
the program will run forever unless the user inputs q to exit

up to now i managed to create the following:

addName = raw_input("New Name:")
addid = raw_input("ID:")
dictionary = {}
dictionary[addName] = addid
print('Name: ' + addName + '  ID: ' +  addid)

i would like to have the program run continuesly, unless the user enters q to exit. How can i do the input in one line so the user will input its name and then its id, separated by comma? Also print all Names and IDs that the dictionary contains.

1 Like