When posting code on Physics Forum for help, it's important to make sure it is readable and understandable. Directly pasting code into a post fails to accomplish this, as all formatting and whitespace is stripped by the forum software. Indentation and formatting exists for a reason: to allow others to easily read and comprehend your code. This is especially important in languages where whitespace is significant, such as the Python programming language.
The following is an example...