Python: create a function to modify a list by reference not value
- by Jonathan
Hey all-
I'm doing some performance-critical Python work and want to create a function that removes a few elements from a list if they meet certain criteria. I'd rather not create any copies of the list because it's filled with a lot of really large objects.
Functionality I want to implement:
def listCleanup(listOfElements):
i = 0
for…