python怎么读取文本文件?
文件的读取
步骤:打开 -- 读取 -- 关闭
>>> f = open('/tmp/test.txt') >>> f.read() 'hello python!\nhello world!\n' >>> f.close()
相关