Creating Functions

Function in Python is defined by the „def “ statement followed by the function name and parentheses ( () ).

Let us define a function by using the command „def func1():“ and call the function. The output of the function will be „I created a Python function“.

The function print function1() calls our def function1(): and print the command „I am learning Python function None.“

Hinterlasse einen Kommentar

Erstelle eine Website wie diese mit WordPress.com
Jetzt starten