Quote:
Originally Posted by cybmole
that is interesting, could you talk us through it please.
I can intuit what most of the code is doing, but what is the significance of needing exactly 4 spaces in two locations?
|
It is Python code. Rather than using delimiters of some sort, Python uses the indent levels to indicate code blocks. The "def" line is defining a function. Any code lines in the function have to be indented under it. The indent is usually four spaces, but a single space or a tab should work.