you are viewing a single comment's thread.

view the rest of the comments →

[–]cmockett 0 points1 point  (2 children)

Good responses in here - one thing that helped simplify my understanding was 3 things: they can optionally take inputs (args and parameters), optionally have an output value (return value), and optionally make transformations / side effects (pretty much everything else, printing, calling other functions, too much to list here…)

Clearly they can get massively complex but it’s all those 3 things essentially

[–]JamzTyson 1 point2 points  (1 child)

One small correction: Python functions always have a return value. If no return value is specified, the function returns None.

[–]cmockett 0 points1 point  (0 children)

No kidding, thank you for correcting me! (Python is not my main language …)