Call functions

After defining a function with the keyword def, it can be called using the function name.

Code Explanation

LineDescription
1Defines the function printLine()
2Outputs the string “Sample Output”
4Calls the printLine() function
def printLine():
    print("Sample output");

printLine()
Output
Sample output