Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Python question

Name: Anonymous 2011-12-20 5:33

How can I remove all the words in one list from another list without loosing duplicates or order?

eg:

aList = ['so', 'what', 'man', 'what']

noiseWords = ['so', 'um', 'crap']

I want aList without the 'so' in noiseWords.
Using Python 3.1 btw, thanks for any help.

Name: Anonymous 2011-12-20 8:48


 > (remove* '("so" "um" "crap") '("so" "what" "man" "what"))
 '("what" "man" "what")

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List