Python里面with open as f 写法


with open(r\u0026#39;somefileName\u0026#39;) as somefile: for line in somefile: print line


■网友
【Python里面with open as f 写法】 可以readlines()的。
目测你是在python shell里输入的,检查一下语法有没有错误,另外建议把错误消息贴全一点


    推荐阅读