Practise with mlwebapp

Free Python tools for learning

Free Python tools to try code, observe what happens and understand the concepts explained in the articles.

Python lab: cells and memory

Write your own Python code and add the cells you need. You can also load a guided example to observe variables, results and errors.

The lab offers code completion, addable cells and four optional guided experiments. It runs in your browser, without an account or a local Python installation.

Open the Python lab

The lab starts with one empty cell. Add more cells, or load the guided example. Click Run: Python downloads automatically on the first execution, then the cells run in your browser.

Four experiments with these Python tools

  1. Run in order

    Create a list, calculate its total, then display it. Observe how the cells share the same variables.

  2. Run a cell too early

    Try to use a variable that does not exist yet. The lab displays the error and explains what to do next.

  3. Recognise an outdated result

    Change the input values without rerunning the calculation. Compare the modified list with the total still held in memory.

  4. Distinguish clearing from restarting

    Clear the outputs, then restart the kernel. Check which action preserves variables and which one removes them.

Choose a tool that matches your task

This lab lets you write Python code freely in cells that share the same memory. You can add, delete and move cells. Deleting a cell does not remove the variables it created. To save a notebook, work with files or install libraries, use your usual Python environment. The lab does not save your work automatically.

Python lab preview

Python tools on mlwebapp: a guided example, addable cells and a memory panel showing the list and total 66.
In the guided example, running the cells makes the list and its total available in the session memory.

Connect these experiments with the detailed explanations: Understand the Jupyter kernel and execution order

Documentation for the browser-based Python engine