Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Example: Code structure

Bad: The example below includes a long block of Python code which defines a few functions and also prints and plots some data. It takes effort to unravel what this code does.

Bad code structure example

Good: The same code as above is split into a few code cells. Beside simplifying the code structure it is easier to explain in this setting what is the purpose of each bit of code.

Good code structure example