- 博客(1)
- 收藏
- 关注
原创 【冷知识】在python2.7或更早的版本中模拟类似3.x的print函数
虽然这样做没有必要因为一般情况下,我们可以有更好的方式去实现:例如使用from __future__ import print_function来实现:from __future__ import print_functionprint(123,456,end='',file = (open('temp.txt','w'))#它大致上等价于你在2.x内写 print >>o
2015-12-31 13:18:02
582
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人