摘要: import json #导入JSON模块 with open('data.json',encoding='utf-8') as json_file: #读取JSON文件 py_obj=json.load(json_file) #JSON文件读取到字典 with open('data1.json', 阅读全文
posted @ 2024-02-18 08:21 小戳同学 阅读(14) 评论(0) 推荐(0) 编辑
摘要: import time #导入时间模块 def timer(seconds): start_time=time.time() #获取当前时间 end_time=start_time+seconds #当前时间+要倒数的秒数 while time.time()<end_time: #当前时间小于结束时 阅读全文
posted @ 2024-02-18 08:21 小戳同学 阅读(505) 评论(0) 推荐(0) 编辑