Functions in Python

Function
• A function is a block of code which only runs
when it is called.
• You can pass data, known as parameters, into a
function.
• A function can return data as a result.
• In Python a function is defined using the def

Function Types
• Basically, we can divide functions into the
following two types:
– Built-in functions - Functions that are built
into Python.
– User-defined functions - Functions defined

Post a Comment

0 Comments