---
title: "How to Pass Arguments [Value and Reference] in Python Function"
description: "How Python function works with Pass by value and Pass by reference. Read more."
url: https://srinimf.com/2018/12/31/python-pass-by-value-vs-reference-read-today/
date: 2018-12-31
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2018/12/pexels-photo-3943950.jpeg?fit=1880%2C1253&ssl=1
categories: ["Python"]
tags: ["Python pass by value Vs Reference"]
type: post
lang: en
---

# How to Pass Arguments [Value and Reference] in Python Function

Python is a programming language for data science projects. Here functions play a top role. Since re-usable code, you can put in one function, and you can call as many times as you need. In functions, the below example gives you an idea on Pass by value and reference.

Related[Python Binary files: Purpose of the to_bytes Method](https://srinimf.com/2023/02/27/python-binary-files-purpose-of-the-to_bytes-method/)

---

Advertisements

In functions, two concepts, you can read. Once is Pass by value and the other one is Pass by reference. Value and reference both you need to understand as Value – Literal and Reference – Address.

Related[Function Vs. Method: What is the Difference in Python](https://srinimf.com/2024/10/10/function-vs-method-what-is-the-difference-in-python/)

## [Pass by value and pass by reference in Python](https://srinimf.com/2022/05/23/python-pass-by-value-vs-pass-by-reference-simple-example/)

![python functions](https://i0.wp.com/srinimf.com/wp-content/uploads/2018/12/python-functions.png?resize=550%2C285&ssl=1)

## Pass by Value

The output shows, the same values as defined in inside of function are displayed. It is not modified.

#function definition
#This function updates the passed values

![pass by value](https://i0.wp.com/srinimf.com/wp-content/uploads/2018/12/Pass-by-value.png?resize=562%2C203&ssl=1)

## Pass by reference

The output is modified. This is different from as defined in function. This is due to in-built append function.

# This program demonstrates the concept of call by reference
#function definition

![pass by reference](https://i0.wp.com/srinimf.com/wp-content/uploads/2018/12/Pass-by-reference.png?resize=572%2C195&ssl=1)

**Related Posts**

- [Pass by Value and Pass by Reference in Python](https://srinimf.com/2022/05/23/python-pass-by-value-vs-pass-by-reference-simple-example/)DateMay 23, 2022
- [Python List Reversal: Built-in and Custom Techniques Explained](https://srinimf.com/2023/11/14/how-to-reverse-list-simplified-python-function/)DateNovember 14, 2023
- [Function Vs. Method: What is the Difference in Python](https://srinimf.com/2024/10/10/function-vs-method-what-is-the-difference-in-python/)DateOctober 10, 2024

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2018%2F12%2F31%2Fpython-pass-by-value-vs-reference-read-today%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2018%2F12%2Fpexels-photo-3943950.jpeg%3Ffit%3D1200%252C800%26ssl%3D1&description=How%20to%20Pass%20Arguments%20%5BValue%20and%20Reference%5D%20in%20Python%20Function)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2018/12/31/python-pass-by-value-vs-reference-read-today/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2018/12/31/python-pass-by-value-vs-reference-read-today/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2018/12/31/python-pass-by-value-vs-reference-read-today/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2018/12/31/python-pass-by-value-vs-reference-read-today/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20How%20to%20Pass%20Arguments%20%5BValue%20and%20Reference%5D%20in%20Python%20Function&body=https%3A%2F%2Fsrinimf.com%2F2018%2F12%2F31%2Fpython-pass-by-value-vs-reference-read-today%2F&share=email)
-

### Like this:

Like Loading…
