Code to create a python script (hello.py):
print("Hello world")
Command to execute the script:
python hello.py
Code to create an executable Python script:
#! /usr/bin/env python
print("Hello world")
Command to make the script executable:
chmod +x hello.py
Command to execute the script:
./hello.py