PythonMastery

Everything you can do on PythonMastery

Write, run and fix Python, learn it step by step, and work with real data, all in your browser. Here are all 42 features and where to find each one.

The editor at a glance

Each number sits on a real button. Click a number to read what it does.

Scroll the picture sideways to see all of it.

  1. 1Python version (not on this screen)
  2. 2Quick help (not on this screen)
  3. 3New file (not on this screen)
  4. 4Share every tab (not on this screen)
  5. 5Full screen (not on this screen)
  6. 6Section tabs (not on this screen)
  7. 7Switch layout (not on this screen)
  8. 8Recipe Library (not on this screen)
  9. 9Time Travel (not on this screen)
  10. 10Share (not on this screen)
  11. 11Code Snapshot (not on this screen)
  12. 12Format (not on this screen)
  13. 13Packages (not on this screen)
  14. 14Install a package (not on this screen)
  15. 15Upload and download (not on this screen)
  16. 16Run / Stop (not on this screen)
  17. 17Output (not on this screen)
  18. 18Light, Dark, Eye Saver (not on this screen)

Write and run code

The editor on the home page. Python runs inside your browser, on your own device.

Run Python in your browser

Type code and press Run to see the result straight away. It is real Python, running on your own device.

Press Run, or Ctrl+Enter (Cmd+Enter on a Mac).

Programs that ask questions

Write programs that ask the user something, like a quiz or a calculator. When your code calls input(), a box opens in the output: type the answer and press Enter.

Stop

Code stuck in a loop that never ends? While your code runs, the Run button turns into Stop. Press it to end the program; your code stays as it is.

Packages

Packages add extra tools to Python. NumPy, pandas, Matplotlib and scikit-learn are already here. Need another? Pick it from the list, or type its name: many packages from PyPI, Python's package store, work too.

Open Packages and pick one from the list, or choose Other… and type any package name. Then press Install, the box button next to it.

Several files in tabs

Split a bigger program into several files. Press + to add one. Your files can use each other's code with import, just like on your own computer.

Your files in and out

Bring your work in and take it with you. Upload .py files, data files or a whole project as a .zip. Download the file you are on, or all of them as a .zip.

Your work is kept

Close the page and come back later: your code is still there. It is saved in this browser as you type.

Editor tools

The buttons above your code, and what the editor does for you while you type.

One-click Format

Messy spacing or indentation, maybe from pasted code? One click lines it up the standard Python way.

Press Format, or Shift+Alt+F.

Live syntax checking

Mistakes like a missing bracket or a wrong indent get a wavy underline while you type, and the line number blinks. Point at the underline to see what is wrong, before you even press Run.

Autocomplete

Start typing and the editor suggests the rest: Python's own words, the packages you import and your own variable names.

Recipe Library

14 ready-made programs to learn from or start with, such as a password generator, a currency converter and Conway's Game of Life. Each opens in a new tab, so your own code stays put.

Time Travel

Deleted something by mistake? Each time you pause typing for a few seconds, the editor saves a copy, and it keeps the last 5. Open Time Travel to bring any of them back.

Code Snapshot

Turns your code into a neat picture in a window frame, with its colours, ready to post on social media or send to a friend. It downloads as a PNG file.

Find and replace

Find needs a keyboard

Find any word in your code and change it everywhere at once. The small arrows next to the line numbers fold a block away, so long code is easier to read.

Ctrl+F (Cmd+F on a Mac).

Full screen

Only on computers

Gives the editor and the output the whole window, so you have more room for long code.

Switch layout

Only in computer full view

Put the output under your code, or next to it. The layout button at the top right switches between the two.

Quick help

Not sure what a button does? The compass at the top of the editor opens a short guide: how to write, run and share code, and what is new.

Learn

Lessons, practice and quick answers. Every code example has its own Run button.

Python Academy

242 free lessons in 17 tracks, from your first variable to machine learning and AI.

Python roadmap

Not sure what to learn next? Start with the core route, then choose Web, Data, ML and AI, or Automation. Each path ends in a project you build.

195 Python programs, with practice

Classic programs such as factorial, primes and Fibonacci, with the code, the output and how it works. Press Start practice to type one yourself, step by step.

Short answers

26 quick answers to “how do I…?” questions: read a CSV, parse JSON, call an API, sort a dict.

Tips and case studies

31 tips for writing better Python, each with before-and-after code you can run, and 8 stories of how real projects used them.

Cheat sheets

24 one-page PDFs to print or download: strings, lists, dictionaries and more. Every example is checked against real Python.

Fix errors

What an error message means, and how to fix it.

Error Finder

Got an error you don't understand? Paste the message here: it explains it in plain words and takes you to the fix.

Error reference

80 common Python errors, each with what it means, the code that causes it, and the fix.

Data and machine learning

pandas, charts and models, ready to use.

Notebook

Write code in small blocks (cells) and run them one at a time. Each cell remembers what the earlier ones made, such as your data, models and charts. Opens and saves Jupyter notebook files (.ipynb).

Practice datasets

7 ready CSV files to practise on, such as housing, movies and weather. Each loads with one line of code.

Bring your own data

Upload your own CSV or Excel file, such as your marks or expenses, and explore it with pandas.

Charts

Turn your data into charts. Matplotlib charts appear as sharp pictures. Plotly charts stay live, so you can zoom, point at values and turn 3D charts around.

Machine learning

Teach the computer to find patterns and make predictions. scikit-learn is built in, and XGBoost, LightGBM and statsmodels work too. Train a model on your own CSV. PyTorch and TensorFlow can't run in a browser, so they are not here.

Share

Send your code to a friend, a teacher or your own website.

Share a file

Send your code to a friend or teacher as a link: it opens with your code, ready to run. Or post it to WhatsApp, X, LinkedIn or Facebook, or copy it for Instagram.

Share every tab

Share+ puts all your open files in one link, so a whole project opens with one click. It posts to the same apps as Share.

Put Python on your site

Writing a blog post or course page? Paste in one snippet and your readers get a code box they can edit and run, right on your page. On GitHub, a Run button in your README opens your code here, ready to run.

Comfortable anywhere

On any screen, for as long as you like.

Phones and tablets

The same editor and lessons work on phones and tablets. Select and copy code with your finger, as in any app, and input() works there too.

Light, Dark and Eye Saver

Three looks. On your first visit it follows your device. Eye Saver is a soft cream page for long sessions.

Break reminder

After 65 minutes of active coding, a short friendly message reminds you to stretch, walk, drink water or rest your eyes. Time away from the keyboard doesn't count, it never interrupts a running program, and it closes by itself after 20 seconds.

Screensaver when you step away

Only in computers and tablets in landscape mode

After 5 minutes without typing or clicking, the editor turns into a calm sky scene: rain, snow, a thunderstorm and more, in morning, afternoon, evening or night colours. Press any key to come back.

Live weather while Python loads

While Python starts, the loading screen shows the sky where you are: sun, clouds, rain, snow or a storm, by day or by night.

Private and free

No login, no install and no cost. Your code runs on your device and never leaves it.