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
Getting a list of arrays into a dataframe
Can you give an example? It works for me: >>> import numpy as np >>> import pandas as pd >>> mylist = [np.array([1,2,3,4,5]), np.array([6,7,8,9,10]), np.array([11,12,13,14,15])] >>> pd.DataFrame(mylist) 0 1 2 3 4 0 1 2 3 4 5 1 6 7 8 9 10 2 11 12 13 14 15 More on reddit.com
🌐 r/learnpython
6
1
February 6, 2018
🌐
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.
🌐
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.
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 - As we can see, the list l, that was defined outside of the function, changed after calling the function clearly_not_pass_by_value. Hence, Python does not use a pass-by-value model.
🌐
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.
🌐
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
🌐
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....
🌐
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 - This behavior is akin to the “pass-by-value” behavior observed in other programming languages, where a copy of the variable is passed into a function, and any modifications made inside the function do not affect the original variable.
🌐
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 - In Python, we can easily expand the list, tuple, dictionary as well as we can pass each element to the function as arguments by the addition of * to list or tuple and ** to dictionary while calling function.
🌐
Python Guides
pythonguides.com › python-pass-by-reference-or-value
Python Pass By Reference Or Value With Examples
September 6, 2025 - Python uses call by object reference. Immutable objects (int, str, tuple) behave like call by value. Mutable objects (list, dict, set) behave like call by reference, but only if you modify them without reassigning.
🌐
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 - Lists and sets are mutable, as are dictionaries and other mapping types. Strings and tuples are not mutable. Attempting to modify an element of an immutable object will raise a TypeError. Python works differently from languages that support passing arguments by reference or by value.