You cannot pass anything by value in Python. If you want to make a copy of a, you can do so explicitly, as described in the official Python FAQ:

b = a[:]
Answer from phihag on Stack Overflow
🌐
jdhao's digital space
jdhao.github.io › 2022 › 07 › 27 › pass_list_by_value_python
How to Pass List by Value as Parameter in Python · jdhao's digital space
July 26, 2022 - If we pass list as parameter to a function and change the parameter, the original list is also changed. This is because list is a mutable type, when we pass list to a function, we are passing the same list.
Discussions

Aren't lists pass by reference in Python?
No, they aren't. Read this . More on reddit.com
🌐 r/learnpython
11
1
October 25, 2021
python - Is list pass by value or by reference? - Stack Overflow
Consider the following code, at first glance it does the same thing, but the result is different, sometimes it seems list is pass by value, sometimes list seems pass by reference: lst = [1, 2] def... More on stackoverflow.com
🌐 stackoverflow.com
python - Copy a list of list by value and not reference - Stack Overflow
0 In Python 2, how to copy list of complex nested elements by value, not reference, regardless of the list's content ... Is it ever explained why the Police Dept. is built like a maze with a ton of hidden passages? More on stackoverflow.com
🌐 stackoverflow.com
Python pass by value with nested lists? - Stack Overflow
I'm having a simple issue that's frustrating me. I'm sure I'm making a very obvious mistake, but I can't seem to find it. I want l_old to be the copy of l before undergoing iteration. I have the More on stackoverflow.com
🌐 stackoverflow.com
🌐
Sololearn
sololearn.com › en › Discuss › 2737580 › solved-how-to-pass-by-value-in-python
[SOLVED] How to pass by value in python?
Sololearn is the world's largest community of people learning to code. With over 25 programming courses, choose from thousands of topics to learn how to code, brush up your programming knowledge, upskill your technical ability, or stay informed about the latest trends.
🌐
Python
mail.python.org › pipermail › tutor › 2005-December › 043778.html
[Tutor] How to Pass lists by value - Python mailing list
December 6, 2005 - > > > Question is, in the 1st scenario, how do I forcefully pass the > variable > by value rather than reference. Why is there a difference between the > two scenarios? > > Cheers > Hans > _______________________________________________ > Tutor maillist - Tutor at python.org <mailto:Tutor at python.org> > http://mail.python.org/mailman/listinfo/tutor > <http://mail.python.org/mailman/listinfo/tutor> > > > > def junk(x): > x.append("20") > return x > > a = ["10"] > b = junk(a[:]) > > That should give you what you're looking for a[:] will pass the values > of a.
Find elsewhere
🌐
Mathspp
mathspp.com › blog › pydonts › pass-by-value-reference-and-assignment
Pass-by-value, reference, and assignment | Pydon't 🐍 | mathspp
November 3, 2021 - This article explains why Python doesn't use a pass-by-value system, nor a pass-by-reference.
🌐
W3Schools
w3schools.com › python › gloss_python_function_passing_list.asp
Python Passing a List as an Argument
E.g. if you send a List as an argument, it will still be a List when it reaches the function: def my_function(food): for x in food: print(x) fruits = ["apple", "banana", "cherry"] my_function(fruits) Try it Yourself » · Python Functions Tutorial Function Call a Function Function Arguments *args Keyword Arguments **kwargs Default Parameter Value Function Return Value The pass Statement i Functions Function Recursion
🌐
GeeksforGeeks
geeksforgeeks.org › python › pass-by-reference-vs-value-in-python
Pass by reference vs value in Python - GeeksforGeeks
June 3, 2026 - Explanation: List is mutated inside the function and the changes persist outside because both lst and a refer to the same object. In pass-by-value, a copy of the variable is passed, so changes inside the function don't affect the original.
🌐
Medium
medium.com › @devyjoneslocker › understanding-pythons-pass-by-assignment-in-the-backdrop-of-pass-by-value-vs-9f5cc602f943
Python : What is it? Pass by Value or Pass by Reference? It is Pass by Assignment | Medium
June 10, 2023 - Both the inner and outer variables still refer to the same object, while the content of that object has been altered by the addition of the new value. ... This behavior in Python for mutable objects, such as lists, mimics the “pass-by-reference” behavior found in some other programming languages.
🌐
LinkedIn
linkedin.com › pulse › understanding-pass-by-value-vs-pass-by-reference-elhousieny-phdᴬᴮᴰ
Understanding Pass-by-Value vs. Pass-by-Reference and Mutable vs. Immutable in Python
August 20, 2023 - Let's illustrate this with examples: ... with mutable objects, such as lists and dictionaries, Python passes a reference to the object instead of copying its value....
🌐
Quora
quora.com › How-do-you-pass-a-list-of-values-to-a-function-in-Python-3-x
How to pass a list of values to a function in Python 3.x - Quora
Answer: That’s easy! [code]def function(variable_a, variable_b): print(variable_a, variable_b) list_of_values = [1, 2] function(*list_of_values) [/code]So, what I did there? I used *(asterisk) to unpack the list of numbers (or any values) into separate parameters. Since, the function accep...
🌐
Robert Heaton
robertheaton.com › 2014 › 02 › 09 › pythons-pass-by-object-reference-as-explained-by-philip-k-dick
Is Python pass-by-reference or pass-by-value? | Robert Heaton
The two most widely known and easy to understand approaches to parameter passing amongst programming languages are pass-by-reference and pass-by-value.
🌐
GeeksforGeeks
geeksforgeeks.org › python › pass-a-list-to-a-function-in-python
Pass a List to a Function in Python - GeeksforGeeks
July 23, 2025 - list l is passed, printing the numbers one by one. This allows us to pass a list to a function and unpack it into separate arguments.
🌐
Toppr
toppr.com › guides › computer-science › programming-with-python › lists › lists-as-arguments
Python Passing a Lists as Arguments: Definition and Concepts
May 25, 2021 - While specifying a dictionary with ** as an argument, the key will be extended as an argument name and value as the argument’s value. Each and every single element will pass as the keyword arguments. Let’s learn more about lists as arguments.
🌐
Delft Stack
delftstack.com › home › howto › python › python pass list to function
How to Pass List to Function in Python | Delft Stack
February 2, 2024 - When working with variable-length arguments using *args, lists can serve as a convenient means to pass multiple values to a function. Lists can be unpacked and passed as separate arguments within the tuple created by *args.
🌐
Real Python
realpython.com › python-pass-by-reference
Pass by Reference in Python: Background and Best Practices – Real Python
March 18, 2026 - After gaining some familiarity with Python, you may notice cases in which your functions don’t modify arguments in place as you might expect, especially if you’re familiar with other programming languages. Some languages handle function arguments as references to existing variables, which is known as pass by reference. Other languages handle them as independent values, an approach known as pass by value.