8- Functions
Function is a block of code allowing us to use the same function whenever we call it.
def my_function():
print("Hello from Python for researchers tutorial!")
my_function()
# Hello from Python for researchers tutorial!
A function with an argument:
def function1(fname):
print(fname + " Azad Othman Rasul")
function1("Anas")
# Anas Azad Othman Rasul
function1("Aviar")
# Aviar Azad Othman Rasul
function1("Muhammad")
# Muhammad Azad Othman Rasul
If you like the content, please SUBSCRIBE to my channel for the future content.
To get full video tutorial and certificate, please, enroll in the course through this link: https://www.udemy.com/course/python-for-researchers/?referralCode=886CCF5C552567F1C4E7
Top comments (0)