Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 433 Bytes

File metadata and controls

28 lines (17 loc) · 433 Bytes

Commands used in the Egghead.io Series Intro to Python

Lesson Six - Execute a script in Python

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