摘要: w,r,a操作 import os with open('a.txt','wb') as fp; file = open('a.txt','w',encoding = 'utf-8') # w是覆盖并且重新写入 file.write('Python') # 文件的杜西呃怎么打印出来是个中文字符 # 阅读全文
posted @ 2021-06-03 19:32 索匣 阅读(156) 评论(0) 推荐(0) 编辑
摘要: # lst = [10, ['hello', 'world'], 20, 30, 100, ['hello', 'world'], 'hello', 'world'] # lst3 = [True,False,'hello'] lst[3:] = lst3 #[10, ['hello', 'worl 阅读全文
posted @ 2021-06-03 18:36 索匣 阅读(46) 评论(0) 推荐(0) 编辑