Functions in Python programming are used to divide a large program into sub-programs for easy control. All these sub-programs are called sub-functions of the program.
def fun(): #this is Function which name is 'fun()',
print("This is Function")
fun() #calling 'fun()' function.
print("After Calling Function")
#Must Write 'def' Before Function Name when U Declaring Function.
def fun(): #'fun()' is name of Function.
print("This is 1st Function")
print("Before Calling 1st Function")
fun() #calling 'fun()' function.
print("After Calling 1st Function")
def fun2(): #'fun2()' is name of Function.
print("This is 2nd Function")
print("Before Calling 2nd Function")
fun2() #calling 'fun2()' function.
print("After Calling 2nd Function")
def fun(): #'fun()' is name of Function.
print("This is 1st Function")
print("This is Also 1st Function")
print("Before Calling 1st Function")
fun() #calling 'fun()' function.
print("After Calling 1st Function")
def fun2(): #'fun2()' is name of Function.
print("This is 2nd Function")
print("This is Also 2nd Function")
print("Before Calling 2nd Function")
fun2() #calling 'fun2()' function.
print("After Calling 2nd Function")
def fun(): #'fun()' is name of Function.
print("This is fun Function")
def fun2(): #'fun2()' is name of Function.
print("This is fun2 Function")
print("This is Also fun2 Function")
def fun3(): #'fun3()' is name of Function.
print("This is fun3 Function")
print("Before Calling Functions")
fun2() #calling 'fun2()' function.
fun() #calling 'fun()' function.
fun3() #calling 'fun3()' function.
print("After Calling Functions")