Python Functions are a block of statements that does a specific task. The idea is to put some commonly or repeatedly done task together and make a function so that instead of writing the same code again and again for different inputs, we can do the function calls to reuse code contained in it over and over again.

Defining a Function
We can define a function in Python, using the def keyword. A function might take input in the form of parameters.
The syntax to declare a function is:

Here, we define a function using def that prints a welcome message when called.