python中的input与raw_input

 时间:2024-11-01 14:59:42

1、进入python2版本中。

python中的input与raw_input

2、先试用input输入一段文字。不加双引号,就会报错,因为它并不是一个合法的表达式。

python中的input与raw_input

3、如果加上双引号,那么这段程序就可以直接运行了。

python中的input与raw_input

4、打开python3环境。

python中的input与raw_input

5、如果使用raw_input,会直接报错的,因为在python3中这个函数已经被移除了。

python中的input与raw_input

6、但是使用input的话,输入的内容加不加双引号都不会报错。

python中的input与raw_input
  • 小黑盒怎么打开回复消息通知
  • ps3模拟器高达fb设置
  • 清华大学艺术博物馆停车攻略
  • 猪精肉炒包菜片
  • 如果亲属有广州户口,那怎么入户广州呢?
  • 热门搜索
    姜汁撞奶的做法 土豆烧鸡块的做法 脆麻花的做法和配方 牛肉板面的做法 口味虾的做法 旻怎么读 then怎么读 鉴怎么读 鲈鱼的做法 蛋挞皮的做法简单做法