Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

731 B
Raw Blame

Getting around multiple definition errors

marimo does not allow the same variable to be defined in multiple cells. This restriction guarantees that the code on the page matches the outputs you see, eliminates hidden state and hidden bugs, and lets marimo run your notebooks as web apps and scripts, but it also has a learning curve. Here are some tips to help you adapt.

!!! Tip "Learn more"

Check out our guide on [multiple definition errors](../../guides/understanding_errors/multiple_definitions.md)
to learn more, or watch our [YouTube video](https://www.youtube.com/watch?v=5TzAADGRfxU).

/// marimo-embed-file size: xxlarge mode: edit filepath: examples/running_cells/multiple_definitions.py ///