Python Functions
Creating a Function
In Python a function is defined using the def keyword:
Example
def my_function():
print("Hello from a function")
print("Hello from a function")
Related Pages
Python Functions Tutorial Call a Function Function Arguments *args Keyword Arguments **kwargs Default Parameter Value Passing a List as an Argument Function Return Value The pass Statement i Functions Function Recursion