I like this one. I would modify somewhat. If you don't like "not"
you could change the function name to keep_item() and reverse the
logic. i_write = 0 for item in myList: if not needsToBeDeleted(item): myList[i_write] = item i_write += 1 del myList[i_write:len(myList)] On 5/20/2018 6:20 PM, Ian Mallett
wrote:
|