摘要: 一、文字读取并打印拼接字符串 1 with open('G:\python\char.txt') as f: #使用open()函数以只读模式打开文件 2 s=f.read() #使用read()方法一次性读取整个文件。 3 number='' #定义一个空的字符串 4 for char in s: 阅读全文
posted @ 2019-11-27 17:00 Deng0727 阅读(201) 评论(0) 推荐(0)