【学习笔记】Python的 Hello world
Python 交互模式运行Hello worldcmd窗口输入 python,即可进入Python交互模式python交互模式下输入:print(“hello world”)显示结果:hello world图示具体运行D:\PythonProject>pythonPython 2.7.11 (v2.7.11:6d1b6a68f775, Dec5 2015, 20:40:30) [M
·
Python 交互模式运行Hello world
- cmd窗口输入 python,即可进入Python交互模式
- python交互模式下输入:print(“hello world”)
- 显示结果:hello world
图示
具体运行
D:\PythonProject>python
Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>>
>>>
>>>
>>> print("hello world")
hello world
>>>
>>>
cmd窗口运行.py文件
- D盘新建PythonProject文件夹
- 新建一个文件,例如 helloworld.py
- helloworld.py 填写 print(“hello world”)
- D盘下运行 python helloworld.py
- 运行结果:hello world
helloworld.py
print("hello world")
D:\PythonProject>python helloworld.py
hello world
更多推荐
已为社区贡献10条内容
所有评论(0)