In this tutorial we will see how to write functions in python.

What are Functions?

Functions are blocks (or lines) of code which allowing us to order our code, make it more readable, and reuse it. We can pass data, known as parameters, into a function. Also, a function can return data as a results.

Creating a Function

Syntax of a function:

This is image title

As we can see, a function is defined using the ‘def’ keyword followed by the function’s name.
Eg.:

This is image title

#technology #programming #data-science #python

How to Write Functions in Python
1.75 GEEK