Write Python. Understand every error.

Open the editor

Python programs for beginners

Classic beginner programs, each with an explanation of the approach, the complete code, a real sample run and the mistakes to avoid. Open any program in the Py-CRAFT editor to run it, change it and watch it work line by line.

Basics

Numbers

Strings

Lists

Patterns

NumPy

How to learn from these programs

Do not just copy the code. Read the approach first and try to write the program yourself. Then compare it with the one here, run it with your own input, and use Step through in the editor to watch each variable change. Finally, change it: every page ends with ideas to try.