Menu
CoddyTech

Run Your First Python Program

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

You already use Rust functions, ownership, and collections. Start Python by opening main.py and running its supplied print statement. Python executes module statements without a fn main() wrapper or a compilation step you manage. The locked driver.py executes your editable module. Later lessons explain imports, exceptions, and shared objects. This is a standalone course; no earlier Python course is assumed.

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 Rust Developers

Practice on your own: Online Python compiler