What are the benefits of using a function?
A function is a set of instructions which perform a specific task. The function is capable to accept the input, after that perform some operation and can capable to return a value or an output.
The sample code for creating a function is:
def function_name():
# statement (s)
return 0
The benefit of using a function is listed below: