Category Python

Pass by Value in Python | Pass by Reference

Pass by value and Pass by object reference in Python

When we define a custom or user defined function in Python we may, optionally we may need to specify parameter names between the function’s parentheses. If we specify parameters in the function definition, then we need to pass argument values…

Function Arguments in Python

In Python, we can pass a piece of data into a user-defined function definition based on function arguments and parameters. Parameters are the local variables mentioned within the parentheses in the function definition. We also call them as formal parameters.…

Calling a Function in Python

Example of calling a function in Python

In this tutorial, we will learn about calling a function in Python with the help of examples. So far, we have studied that a function ‘object’ is a block of code that performs a specific and well-defined task. It is…

User Defined Functions in Python

In the previous tutorial, we have familiarized about functions in Python. We have studied that there are two types of functions in Python programming language. They are: Predefined functions (also called built-in functions) User-defined functions A predefined function is that…

Functions in Python | Types, Examples

Python functions definition

A function in Python is a named block of organized and connected statements that performs a specific task. In other words, a function is a block of code that performs a specific and well-defined task. It organizes the code into…