Python Tutorial
How To Create Function in Python

Hello, Guy’s Welcome To The Another Python Tutorial Article. In This Article, We Will Learn What is Function In Python and How To Create Function In Python Programming Language.

What is a Function?

First We Discuss What is a Function After We Will Discuss How To Create Function In Python. So In Simple Word When You Write 10-20 Line Of Code In Your Python Project It’s Readable And Ok But If You Work On a Big Project And Write 1000 Lines Of Code So There Are Many Confusions Occur In Readability And Calling The Data.

So, Function Will Introduce, With The Help Of Function You Can Easily Encapsulate Your Data Inside The Function. and You Will Easy Call It. You Create Many Function As You Want.

Learn:-  What is For Loop




Where def is a Keyword That Defines That This is a Function. and You Give Any Name Of There Function According To There Convenient.


Write a Program To Print Hello World Inside The Function?


def raj():

print(“Hello World”)

Where def is a Keyword. raj is the Name Of That Function. And The Parenthesis is Indicate The Function Can not Hold Any Arrangement.


Hello World

Thanks For Reading This Article.