Functions – Overview

In Python, as well as other languages, we can write our own functions. Writing functions allows one to name a group of statements that can be executed by calling the function.  The benefits of using a function include

  • making a program easier to read and debug.
  • making a program shorter by eliminating repetitive code.
  • making a program easier to change/maintain.
  • allowing the programmer to debug in stages, one function at a time.
  • allowing code to be re-used in other programs.

The following posts provide details about functions in Python: