Back to Marimo

Getting around multiple definition errors

docs/examples/running_cells/multiple_definitions.md

0.23.5730 B
Original Source

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 ///