Programming with Python

  1. Home
  2. Docs
  3. Programming with Python
  4. Functions in python

Functions in python

A function is a block code that takes in some data and either performs some kind of transformation and returns the transformed data, or performs some task on the data or both.

It helps us to break the program into smaller and modular parts.

Functions are a key way to define interfaces, so programmers can share their code.

The function contains the set of programming statements enclosed by {}.

Articles

Was this article helpful to you? Yes No

How can we help?