Python Program to Read and Display Student Data
name = '' id_num = '' mark = 0
while True: user_input = input('Type in name;id;mark or Q to stop: ') if user_input == 'Q': break else: data = user_input.split(';') name = data[0] id_num = data[1] mark = int(data[2]) print('Name: {} ID: {} Mark: {}'.format(name, id_num, mark))
原文地址: https://www.cveoy.top/t/topic/oZUQ 著作权归作者所有。请勿转载和采集!