
Python学习笔记
文章平均质量分 54
日常学习
YYYYYst
You can never make the next step if you dwell on past glory or shadow
展开
-
Python学生信息管理
Python实现学生信息管理共包括四个模块,每个模块负责不同的工作ui.py中包含菜单和功能信息的联系bll.py中实现学生信息的增删查改,文件读取导出,学生分数排序等操作main.py调用菜单,model.py定义学生的基本信息构成model.pyclass StudentModel: def __init__(self, id, name, age, score, item): self.id = id self.name = name原创 2021-04-17 21:03:48 · 739 阅读 · 3 评论 -
Python实现列表信息输出到文件以及将文件中的信息读取到列表
python将列表格式化输出到文件中学生信息管理为方便观看,输出为类似字典形式# 录入文件 def output_file(self): with open('student_information.txt', 'a+') as f: for i in range(0, len(smc.new_List)): for k,v in smc.new_List[i].items():原创 2021-03-15 00:00:20 · 3149 阅读 · 1 评论