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里输入的,检查一下语法有没有错误,另外建议把错误消息贴全一点
推荐阅读
- 怎样成为一名合格的Python程序员?
- python 爬虫,咋获得输入验证码之后的搜索结果
- 车车人|为什么老司机进隧道开车时都不愿走右侧车道?原来里面大有学问!
- python的html5lib这个库咋使用啊我在网上也没有找到相关文档
- 零基础入门学习啥语言好
- 在英雄联盟里面跟别人solo有啥技巧吗一对一的那种〒_〒?
- Python3.4和3.5区别大么
- python 中 def_():...... return _有啥作用
- 新互联网网站用Java还靠谱么对比Php,Python,Ruby的话
- 为啥滴滴和快的的专车业务在叫车的产品流程里面没有参考uber的派单的模式而是继续采用司机抢单的模式