PythonFunctions
Creating a Function
In Python a function is defined using thedef keyword:
Example
def my_function():
print("Hello from a function")
print("Hello from a function")
Related Pages
Python Functions TutorialCall a FunctionFunction Arguments*argsKeyword Arguments**kwargsDefault Parameter ValuePassing a List as an ArgumentFunction Return ValueThe pass Statement i FunctionsFunction Recursion