Python Day1

2017-04-27  本文已影响0人  读书的番茄

python2.x和3.x

第一个区别

python2.x

    print'python 你好!'

python3.x

    print('python 你好!')

2.x输出无需括号,3.x必须有,否则提示

SyntaxError: Missing parentheses in call to 'print'

第二个区别

3.x里,input替代了raw_input

上一篇 下一篇

猜你喜欢

热点阅读