Python by Example
Learn Python by running one small program at a time.
Ten beginner-friendly examples run directly in your browser with Pyodide. No Python installation required.
Your code runs locally in this page. Do not paste passwords, API keys, or private code.
Example 1 of 10
Loading examples…
Output
Loading Python runtime…