Comment

testasdf1

>>>li=['a', 'mpilgrim', 'foo', 'b', 'c', 'b', 'd', 'd']
>>>[x for x in li if x not in locals()['_[1]']]

output:

['a', 'mpilgrim', 'foo', 'b', 'c', 'd']

While, I can't explain how locals()['_[1]'] works....

Replies

qman

I could explain it, but then I'd have to kill you...