首页 > 编程语言 > 详细

python 3.x 不再提供raw_print()

时间:2014-11-02 17:46:58      阅读:294      评论:0      收藏:0      [点我收藏+]

python 3.x 不再提供raw_input(), 改为使用input(), print 改为 print(),

print 无括号形式不能再使用.

>>> raw_input(‘input name:‘);

Traceback (most recent call last):

  File "<pyshell#3>", line 1, in <module>

    raw_input(‘input name:‘);

NameError: name ‘raw_input‘ is not defined

 

print ‘hello world!‘
SyntaxError: Missing parentheses in call to ‘print‘

 

python 3.x 不再提供raw_print()

原文:http://www.cnblogs.com/cbyniypeu/p/4069531.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!