What is a more efficient way in Python to return list elements which are not in a second list?
- by Hobhouse
Is there a faster way to do this in python?
[f for f in list_1 if not f in list_2]
list_1 and list_2 both consist of about 120.000 strings. It takes about 4 minutes to generate the new list.