| Line 132: |
Line 132: |
| | | | |
| | === Functions === | | === Functions === |
| | + | All arguments in Python are passed by reference, if you change a variable value inside a function it will be changed at the calling function. |
| | + | <source lang="python"> |
| | + | def MyFunction(formal_arg, optional_arg = None, *variable_lenght_args): |
| | + | print formal_arg |
| | + | if optional_arg: |
| | + | print optional_arg |
| | + | for arg in variable_lenght_args: |
| | + | print arg |
| | + | </source> |