Does Python have pointers?

27 · Ned Batchelder · March 11, 2024, 11:43 a.m.
Summary
People sometimes ask, “Does Python have pointers?” I hate to be the typical senior engineer, but this is one of those questions where the answer is, it depends what you mean by pointer.The classic definition of a pointer is: a variable that holds the address of something else and that you can use to work with that something else. In very broad pseudo-code, it would be something like this: myvar = SOMETHING;mypointer = get_address_of(myvar);print(get_value_via_pointer(mypointer));## output is SO...