标签:pytho world comm and pass hello man creat pre
Python scripts can be executed by passing the script name to the python command or created as executable commands that can run stand-alone. You’ll learn how to create both in this lesson.
script.py:
print("Hello World")
When we want to run the script, we can do:
python3 script.py
We can also make the script a stand-alone executable:
#! /usr/bin/env python print("Hello World")
chmod +x script.py
./script.py
[Python] Execute a Python Script
标签:pytho world comm and pass hello man creat pre
原文地址:http://www.cnblogs.com/Answer1215/p/8012206.html