如何运行一个python程序

使用python的解释器运行:打开交互式解释器,写入“print‘hello world’”。

将文件名改为“hello.py”,“py”是后缀名
打开刚才写的代码,点击“Run”→“run module”,或者直接按“F5”,运行代码。
通过Windows命令运行:找到“hello.py”的文件,输入“python hello.py”,即可运行程序。

猜你喜欢

转载自blog.csdn.net/weixin_43358395/article/details/88927155