Menu
CoddyTech

Run Your First Python Program

Lesson 1 of 48 in Coddy's Python for Swift Developers course.

You already write Swift code with functions, collections, and optionals. Open main.py and run the supplied print statement. Python executes top-level statements and uses indentation to form blocks. The locked driver.py starts the task and supplies input/output. This standalone course teaches Python syntax and runtime object behavior before combining them in a multi-file project.

challenge icon

Challenge

Beginner

Run the supplied program once. There is no input. It prints Python is ready followed by a newline. No edits are needed.

Your code goes in main.py. The locked driver.py starts your program and cannot be edited.

Try it yourself

# Starts the program in main.py. Edit main.py to solve the challenge.
from runpy import run_module

run_module("main", run_name="__main__")

All lessons in Python for Swift Developers

Practice on your own: Online Python compiler