Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. >>> messages = [{'text': 'dicks1'}, {'text': 'dicks2'}, {'text': 'vag1'}, {'text': 'vag2'}]
  2. >>> nodicks = [msg for msg in messages if 'dick' not in msg['text']]
  3. >>> nodicks
  4. [{'text': 'vag1'}, {'text': 'vag2'}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement