运行Python
- Python通过解释器运行。
- 在命令行键入
python即可运行Python解释器,在命令提示符>>>后输入Python语句即可。
print('Hello world')
- Windows下,将Python代码保存到
.py文件后,双击运行。
# hello_world.py
print('Hello world')
- Python注释以
#开头的一行。
python即可运行Python解释器,在命令提示符>>>后输入Python语句即可。print('Hello world')
.py文件后,双击运行。# hello_world.py
print('Hello world')
#开头的一行。本文标题:Python3快速入门(0)如何运行Python程序
本文链接:https://www.haomeiwen.com/subject/erufkxtx.html
网友评论