I'm trying to write a line by line breakdown of a function in Python, similar in design to the following:
| code | definition |
|---|
def foo(bar): | We define the function foo to take input and store it in bar. |
print(bar+"!") | Then we print bar and append an exclamation point. |
However, the indented line examples (in this case print(bar + "!")), lose the two leading spaces (as seen in my example above). Is there any way to stop the removal of those? I want to maintain Python's syntax between cells, without having to completely recopy the code each time.