标签: python
帮助我,我想在文件中存储名称和分数。
name = ("Chiken") score = 7 classroom_num = int(input("Please enter your classroom number")) f = open("Classroom %d.txt","w") % (classroom_num) f.write(name, score) f.close()