A function is a block of code which is executed only when a call is made to the function. def keyword is used to define a particular function as shown below:
def function():
print(“Hi, Welcome to Intellipaat”)
function(); # call to the function
Output:
Hi, Welcome to Intellipaat
A function is a block of code which is executed only when a call is made to the function. def keyword is used to define a particular function as shown below:
def function():
print(“Hi, Welcome to Intellipaat”)
function(); # call to the function
Output:
Hi, Welcome to Intellipaat