Functions in Python

In Python a function is some reusable code that takes arguments(s) as input does some computation and then returns a result. We have already seen functions in previous lessons. For example, the print() command that we used is actually a function that allows us to print something.

In Python, there are two kinds of functions:

Create Your Free Account

Create a free account to access this content and join our community of learners.

You'll get access to:

  • Access the full tutorial
  • Join our learning community
  • Track your progress
  • Bookmark content for later