I want to write something that removes a specific element from an array. I know that I have to for loop through the array to find the element that matches the c
Using filter() and lambda would provide a neat and terse method of removing unwanted values:
newEmails = list(filter(lambda x : x != 'something@something.com', emails))
This does not modify emails. It creates the new list newEmails containing only elements for which the anonymous function returned True.