摘要: 如果要写入一些不是字符串的东西, 那么将需要先进行转换: 实例 #!/usr/bin/python3# 打开一个文件f = open("/tmp/foo1.txt", "w")value = ('www.runoob.com', 14)s = str(value)f.write(s)# 关闭打开的文 阅读全文
posted @ 2019-12-18 09:35 StarZhai 阅读(13046) 评论(0) 推荐(0) 编辑