Defining a Function

A python function starts with def keyword followed by name, parenthesis, and colon.

Example:

def calculate():
    print(“This is a calculate function”)
Calling a Function

You can call a python function whenever you need. In Python, you can call the function with function name.

Example:

def calculate():
    print(“This is a calculate function”)

calculate() 	## Calling a function


Related Tutorials