随笔分类 -  随笔

谢谢日记,完成我未竟的写作大梦
摘要:迭代--一个接一个地读取列表中值的过程 list1=[1,2,3] for i in list1: print(i,end=' ') # 1 2 3 list2=[x*x for x in range(5)] for i in list2: print(i,end=' ') # 0 1 4 9 16 阅读全文
posted @ 2022-02-05 12:33 Monster1728 阅读(113) 评论(0) 推荐(0) 编辑
摘要:数据写入: os.makedirs(os.path.join('..', 'data'), exist_ok=True) data_file1= os.path.join('..', 'data', 'animals.csv') with open(data_file1,'w',encoding=' 阅读全文
posted @ 2022-01-30 19:18 Monster1728 阅读(119) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示