查看蟒蛇版本
python -v
第一个蟒蛇程序
使用哪个python查看安装目录
例如:usr / bin / python3
在文件helloWorld.py中第一行输入#!加安装目录指定的Python解释器,如
程序:
#!/usr/bin/python3
print("Hello,world")
运行:
helloWorld.py
若没指定的Python解释器路径,则
python helloWorld.py
python -v
使用哪个python查看安装目录
例如:usr / bin / python3
在文件helloWorld.py中第一行输入#!加安装目录指定的Python解释器,如
程序:
#!/usr/bin/python3
print("Hello,world")
运行:
helloWorld.py
若没指定的Python解释器路径,则
python helloWorld.py