In Python, how can I remove an object from a list of objects? Like this:
x = object()
y = object()
array = [x, y]
# Remove x
I've tried array.remove()
but it only works with a value, not a specific location in the array. I need to be able to delete the object by addressing its position (remove array[0]
).