One of the problems with python syntax is that when you share source code (forums), also when copying and pasting into different notebooks or similar the tab char is eliminated, perform automatic justification to the left. the ⇥ char It also facilitates the correction of the source code, since the space character is not visible.
an idea to not lose the tabulation is to interpret the ⇥ character as a space
Code : Tout sélectionner
#cas def sumxy(x, y = 2): ⇥return x + y #end