Python基础02-Hello World
2017-01-05 17:11:48 如果你已经安装好Python,在命令行输入python
直接进入Python环境,Python以 >>> 开头
输入print("hello world!")
屏幕会直接输出结果。
或者使用另外一种方式,把print("hello world!")
保存为hello.py,在命令行而不是解释器(运行quit()
退出解释器)运行python hello.py
,或者在解释器里直接运行hello.py
,可以得到同样的结果(需要注意路径问题)。
参考:Python快速教程 作者:vamei