How does Python's list.remove(value) determine what value to remove?

Viewed 2239

If I have list of objects:

l = [a, b, c]

Then I remove one of those objects:

l.remove(a)

How is python determining which item in the list to remove (under the hood)?

Is it using the memory location of a? (which you can view with hex(id(a)))

3 Answers
Related