User-Defined Functions
Learn how to make your own functions.
We know that built-in functions (input()
, print()
, int()
, etc.) are like standard ready-to-cook recipes everyone knows how to use. But did you know we can create our own functions as well? We cannot possibly have a ready-made function against every need in the world. Imagine if we wanted to create YouTube, and there was a built-in function BuildYouTubeForMe("please")
? It doesn’t work like that, right? Instead, Python lets us create functions of our own that we can then use as and whenever required, just like we can use built-in functions.
Get hands-on with 1400+ tech skills courses.