摘要: 一、传入的参数类型要求不同: 1、 file.write(str)需要传入一个字符串做为参数,否则会报错。 write( "字符串") 1 with open('20200222.txt','w') as fo: 2 fo.write([‘a','b','c']) #错误提示:TypeError: 阅读全文
posted @ 2020-02-24 19:55 小煜豆 阅读(2216) 评论(0) 推荐(0)