Python3.3 input v.s. raw_input
2014-02-28 21:40
465 查看
print("The world of python welcomes to you!") name = raw_input("What is your name? ") print("Hello, " + name + "!")
print("The world of python welcomes to you!") name = input("What is your name? ") print("Hello, " + name + "!")
在windows下双击附件hllo.py文件,运行结果:
最后一行代码改为raw_input函数,则程序运行完毕,来不及看结果,窗口也跟着关闭。
附件hello.py文件代码内容:
print("The world of python welcomes to you!") name = input("What is your name? ") print("Hello, " + name + "!")
input("Press <Enter>")
本文出自 “飒飒秋风” 博客,请务必保留此出处http://xjhznick.blog.51cto.com/3608584/1365232
相关文章推荐
- Python小程序:获取二进制文件的所有内容
- Python内存泄漏问题查找
- wxPython
- Python小程序:获取文本文件的所有内容
- python使用Tkinter编写GUI
- 深入学习python (五) 当pip install 失败抛锚时该怎么办
- python2.7 +xp+setuptool
- python编写GUI
- Python 之模块fnmatch
- python-django中的request对象,得到其POST或GET的JSON数据
- Python正则表达式指南
- python延迟指定时间执行特定任务脚本
- python3.x IDLE学习及基础语法(学习head first python 第一章)
- Python *与** 参数问题
- python 类的使用
- 关于python 安装 delicious
- python 科学计算学习一:numpy文件存取,内存映射
- python beautiful Soup4 Documentation
- Python中的类属性和实例属性以及静态方法和类方法
- Exercise 7: 更多关于打印输出