Nov-12-2017, 04:25 PM
#!/usr/bin/python3 students_DB={} student_number=None #ask input from user or 'q' to exit while True: line = input('Please input the ID and name separated by comma or q to exit: ') if line == 'q': break id, name = line.split(',') students_DB.update({id:name}) #output for key in students_DB: print('{}: name is {}'.format(key, students_DB[key]))