我需要一个pprint函数的帮助。我试图制作一个记录学生身份证号码,姓名,年龄,班级和GPA的程序。我需要使用pprint()函数来打印字典。这是我的代码到目前为止。我不知道在Python中的打印功能关于字典
student=dict()
student['ID']= raw_input ("What is your student ID number?")
student['name']= raw_input ("What is your name?")
student['age']= raw_input ("How old are you?")
student['rank']= raw_input ("What is your class rank?")
student['gpa']= raw_input ("What is your current GPA?")
我需要做什么?我已经尝试了多种代码的变体,但没有工作。谢谢!
当声称你以前的尝试不起作用,它有助于分享这些以前的尝试等等我们可以指出你出错的地方。 – chepner