We call them references. They work like this

i = 5     # create int(5) instance, bind it to i
j = i     # bind j to the same int as i
j = 3     # create int(3) instance, bind it to j
print i   # i still bound to the int(5), j bound to the int(3)

(Sidenote: Small ints are interned, but that isn't important to this explanation)

i = [1,2,3]   # create the list instance, and bind it to i
j = i         # bind j to the same list as i
i[0] = 5      # change the first item of i
print j       # j is still bound to the same list as i
Answer from John La Rooy on Stack Overflow
🌐
Real Python
realpython.com › pointers-in-python
Pointers in Python: What's the Point? – Real Python
March 18, 2026 - Python throws an error, explaining that add_one() wants a pointer instead of just an integer. Luckily, ctypes has a way to pass pointers to these functions. First, declare a C-style integer: ... The above code creates a C-style integer x with a value of 0. ctypes provides the handy byref() to allow passing a variable by reference.
Discussions

Why is there no concept of a pointer or pass-by reference in python? Is there something I can use
Holy cow calm down. EXCEPT THERE IS NO TRUE MULTITHREADING Lol yes there is. The threading module makes real threads. If you are upset about the GIL you just need to learn how to use it. why is there no pointers!? All python names are pointers. It's incredibly hard not to use a pointer. No idea what you are doing but if you mutate a dictionary in a function you will see it in the calling scope. >>> def add_data(d): ... d['Fuck-Me-With-RAM'] = 'pure zen' ... >>> data = {} >>> add_data(data) >>> data {'Fuck-Me-With-RAM': 'pure zen'} Read this: https://nedbatchelder.com/text/names.html this junk language Cheers, don't let the door hit ya More on reddit.com
🌐 r/learnpython
16
0
August 10, 2022
Why doesn't Python have pointers?
What’s a pointer More on reddit.com
🌐 r/learnpython
63
128
April 21, 2023
Simulating Pointers in Python - Stack Overflow
I'm trying to cross compile an in house language(ihl) to Python. One of the ihl features is pointers and references that behave like you would expect from C or C++. For instance you can do this: ... More on stackoverflow.com
🌐 stackoverflow.com
Storing references in variables
Hi, I am reading the book automate the boring stuff, 2nd edition and I came across the following example which describes how values and references work in python: >>> spam = 42 >>> cheese = spam >>> spam = 100 >>> spam 100 >>> cheese 42 " When you assign 42 to the spam variable, you are actually ... More on discuss.python.org
🌐 discuss.python.org
11
0
December 26, 2020
🌐
Launch School
launchschool.com › books › python › read › variables_pointers
How Python objects and variables really work
You can say that a variable points to or references an object in memory, and you can also say that the pointers stored in variables are references. Some languages make a distinction between references and pointers, but Python does not; feel free to use either term.
🌐
Python Morsels
pythonmorsels.com › variables-are-pointers
Variables are pointers in Python - Python Morsels
July 18, 2026 - An assignment in Python points a variable to an object. That's it! Variables don't contain objects, and nothing gets implicitly copied during an assignment. Instead of thinking of variables as buckets that contain objects, think of them as bindings, references, aliases, or pointers.
🌐
TutorialsPoint
tutorialspoint.com › article › what-is-the-pointer-in-python-does-a-pointer-exist-in-python
What is the Pointer in Python? Does a Pointer Exist in Python?
April 4, 2023 - Because of this, Python lacks explicit pointers in the same manner as C or C++. Instead, Python uses a concept called references, which enables indirect access to objects in memory through variables.
🌐
GeeksforGeeks
geeksforgeeks.org › dsa › difference-between-pointer-and-reference-in-programming
Difference between Pointer and Reference in Programming - GeeksforGeeks
August 26, 2026 - Basically, you're creating a second way to access the same memory when you create a reference. References need to be initialized at declaration with a valid variable, unlike pointers, which are not nullable.
🌐
Reddit
reddit.com › r/learnpython › why is there no concept of a pointer or pass-by reference in python? is there something i can use
r/learnpython on Reddit: Why is there no concept of a pointer or pass-by reference in python? Is there something I can use
August 10, 2022 -

I am a C++ and assembly developer mainly, but as someone entering the job market that just doesn't cut it. I have a job I got hired for where I'm taking 4+ years of a python codebase that no one has documented and is spaghetti and updating it, and was supposed to be adding multithreading (EXCEPT THERE IS NO TRUE MULTITHREADING SO I HAVE TO DO MULTIPROCESSING WHICH IS A CLUSTER-F***). So that blows.

BUT

why is there no pointers!? or way to go references? I need to store data in an object that gets passed into some libraries, and then the library runs callbacks where I analyze the crap. From there I need to set the values so in other callbacks I can work with the values. It's a dictionary so I can add some new keys to store the data... except I can't because it's like pass by value so the data instantly gets deleted once it returns from the callback. If I passed in a pointer I'd be set, except that's not possible...

That's just one issue in a mirad of issues I'm facing with this junk language. Not to even mention the horribleness of everything using like 2gb of memory because each process copies the entire memory space of the head process....

Please tell me there's some kinda object or pointer thing I can use.

EDIT : I got the help I needed here, thanks everyone! sorry to trash the language a bit above I was just frustrated lol

Top answer
1 of 4
13
Holy cow calm down. EXCEPT THERE IS NO TRUE MULTITHREADING Lol yes there is. The threading module makes real threads. If you are upset about the GIL you just need to learn how to use it. why is there no pointers!? All python names are pointers. It's incredibly hard not to use a pointer. No idea what you are doing but if you mutate a dictionary in a function you will see it in the calling scope. >>> def add_data(d): ... d['Fuck-Me-With-RAM'] = 'pure zen' ... >>> data = {} >>> add_data(data) >>> data {'Fuck-Me-With-RAM': 'pure zen'} Read this: https://nedbatchelder.com/text/names.html this junk language Cheers, don't let the door hit ya
2 of 4
4
EXCEPT THERE IS NO TRUE MULTITHREADING SO I HAVE TO DO MULTIPROCESSING WHICH IS A CLUSTER-F*** If that's an issue for you then someone used the wrong tool for the wrong job. That said: most of the time asyncio's single-threaded event loop will do just fine. why is there no pointers!? Why should there be? It's a high-level language with a garbage collector. or way to go references? For any collection type or class you're already getting effectively pass-by-reference, but if you mean why won't def foo(x): x = 2 x = 1 foo(x) # x is still 1 here change x to 2: because in python there's no reason it should. Spooky action at a distance is generally discouraged and, just like in C/C++ you should avoid when you reasonably can. It's a dictionary so I can add some new keys to store the data... except I can't because it's like pass by value so the data instantly gets deleted once it returns from the callback. Dictionaries are not passed by value. def foo(x): x["new_key"] = "it's here" y = {} foo(y) print(y) A bit more technically: everything is effectively passed by reference, the language simply (deliberately) has immutable values for integers, floats, strings, and most 'primitive' types like that so there exists no way to express the concept of "edit the value of the python object this variable currently points at" for those primitives. The concept absolutely does exist for objects in general - anything done via the name (as opposed to reassigning the name) acts on the underlying python object. That's why the dictionary key is persisted in y outside the function in my example.
Find elsewhere
🌐
Practicaldatascience
practicaldatascience.org › notebooks › class_2 › week_3 › 13_objects_and_variables.html
Variables are pointers to objects — Practical Data Science with Python
The name we give it is the variable, and it is a pointer to the place in memory that contains the actual data. So when you create a new array, Python puts that list somewhere in memory, kind of like how you might put something big on a shelf in a warehouse. The variable associated with that list (say, my_array) actually just stores the location of the shelf where that list was placed (which we call a reference or a pointer).
🌐
Medium
medium.com › @abhishekjainindore24 › the-concept-of-pointers-in-c-and-c-and-why-python-doesnt-have-them-9ade1875d9ed
The Concept of Pointers in C and C++ and Why Python Doesn’t Have Them | by Abhishek Jain | Medium
October 14, 2024 - Python: The absence of pointers is a feature of Python’s design, aiming to simplify the developer’s job by automating memory management and focusing on higher-level abstractions. Python’s dynamic and managed nature makes pointers unnecessary, providing references to objects instead.
🌐
Reddit
reddit.com › r/learnpython › why doesn't python have pointers?
r/learnpython on Reddit: Why doesn't Python have pointers?
April 21, 2023 -

No, really. I've just started practicing problems on Leetcode and today I tried to do a bunch of things with Linked lists in python. I always second guess myself when I'm writing assignment statements like node = next_node because I'm worried that using shallow copies might screw things up for me.

Wouldn't it have been way easier to directly reference objects by their memory location?

I'm not going to use C for coding interviews so I'd also appreciate any ways I can idiot proof my code when I'm dealing with moving and assigning objects in Python.

One idea I had was to include a deepcopy method in the List node class definition but I can't make any changes to the leetcode question setup.

Top answer
1 of 28
219
Because it’s high level by design
2 of 28
137
Pointers are a concept that really doesn't make sense in Python, both because of practical reasons and philisophical reasons. In Python, "variables" are really "lebels" attached to objects, not a specific memory location in your address space. The internals of the Python interpreter do make use of pointers, but that's because it's written in C. Philisophically, the designers of Python view pointers as an intrinsically bad thing - they have all sorts of downsides that would have made Python a bad language. What Python has instead, is bindings - the labels I mentioned above - and they actually do behave in some ways like pointers, but without the downsides. Bindings do not have a type, but the objects they are bound to do have a type, and unlike in C, an object (i.e. a value or more complex type) can have multiple labels. Furthermore, container types like tuples, lists, and dictionaries contain references to objects, which are very like pointers: they don't have a name (binding) but they do give you a way to refer to an object - of any type. If you make a linked list element class in Python like this: class Element: def __init__(self,pred,value): self.pred = pred self.value = value That gives you a linked list with a reference to the previous Element in each object, and you can traverse the links like this: >>> a = Element(None,1) >>> b = Element(a,2) >>> c = Element(b,3) >>> c.pred.pred.value 1 >>> c.pred.value 2 Semantically, that's pretty much like pointers. Generally it's less useful to use such structures in Python, though it's still valid in some situations, but you can take advantage of references to build complex dynamic data structures you can traverse in the same way as most linked-list or tree structures in other languages.
🌐
Scaler
scaler.com › home › topics › do we have pointers in python?
Do We Have Pointers in Python? - Scaler Topics
May 4, 2023 - When you pass by reference, you are passing the reference to the original variable, and any changes will be reflected in the original variable. Passing by value creates a duplicate of the original variable, and any changes are not reflected in the original. ... Your integer has been increased by one. You have used real pointers in Python successfully.
🌐
Python Morsels
pythonmorsels.com › data-structures-contain-pointers
Data structures contain pointers - Python Morsels
July 18, 2026 - We're looking up the second list, and then the second value in the second list, and assigning that value to 1. So we've asked to change the middle item in the middle list to the number 1. ... Instead, we changed the middle number in all three of our inner lists. ... Lists in Python don't actually contain objects. They contain references to objects.
🌐
Medium
medium.com › better-programming › beginning-python-programming-part-2-reference-types-pointers-and-collection-types-a806ef6b92cf
Beginning Python Programming — Part 2 | by Bob Roebling | Better Programming
July 31, 2019 - In Python, this concept doesn’t exist. Instead, we just have reference types. As much as I’d like to dive right in, there is this prerequisite which is common to all object-oriented languages but is one of the hardest concepts to grasp called pointers. Last time we talked about memory and how it is arranged in blocks, bytes, and bits.
🌐
Ned Batchelder
nedbatchelder.com › blog › 202403 › does_python_have_pointers
Does Python have pointers? | Ned Batchelder
March 11, 2024 - Some languages like C also allow pointer arithmetic to adjust a pointer from one item in an array to another. Python’s references don’t allow for that. Python’s standard library provides ctypes, which is great for interfacing with native C code, exposing details there including C pointers.
🌐
Oreate AI
oreateai.com › blog › python-pointers-and-references
Python Pointers and References - Oreate AI Blog
December 3, 2025 - They allow you to directly manipulate memory addresses, giving you fine-grained control over data storage and retrieval. However, when it comes to Python—a high-level language designed for simplicity and readability—the idea of pointers is abstracted away entirely. Instead of dealing with raw memory addresses, we work with references.
🌐
Anvil
anvil.works › articles › pointers-in-my-python-1
Memory Management in Python - Part 1: What Are Pointers?
Pointers can be thought of as names - that is, entries in Python’s namespace - that correspond to objects in Python’s memory. In the above example, the pointer is my_string, and the object in memory is the string with value "Hello World!". By using a pointer in namespace, you can access and manipulate the object in memory. And, just as a person might have multiple names, multiple pointers might point to the same object. A note about terminology: the ‘pointers’ referred to in this article are not directly equivalent to pointers in C or C++ (in fact, they’re more similar to references in C++).
🌐
YouTube
youtube.com › watch
Variables are pointers in Python - YouTube
Python's variables are not buckets that contain objects; they're pointers. Assignment statements don't copy: they point a variable to a value (and multiple v...
Published: May 2, 2024
🌐
Python.org
discuss.python.org › python help
Storing references in variables - Python Help - Discussions on Python.org
December 26, 2020 - Hi, I am reading the book automate the boring stuff, 2nd edition and I came across the following example which describes how values and references work in python: >>> spam = 42 >>> cheese = spam >>> spam = 100 >>> spam 100 >>> cheese 42 " When you assign 42 to the spam variable, you are actually creating the 42 value in the computer’s memory and storing a reference to it in the spam variable.