Use of function in python

Author: Al-mamun Sarkar Date: 2020-03-25 08:43:47

Use of function in the python programming language. The following code shows how to define and use a function in python.

def fun():
    print("Hello word")
    return 12


a = fun()
print(a)

 

Output:

Hello word
12