In python, a good way to remove a list from a list of dicts

Posted by ensnare on Stack Overflow See other posts from Stack Overflow or by ensnare
Published on 2010-05-20T22:13:53Z Indexed on 2010/05/20 22:20 UTC
Read the original article Hit count: 189

Filed under:
|
|
|

I have a list of dicts:

list =  [{'title': u'Politics', 'id': 1L, 'title_url': u'Politics'}, 
         {'id': 3L, 'title_url': u'Test', 'title': u'Test'}]

I'd like to remove the list item with title = 'Test'

What is the best way to do this given that the order of the key/value pairs change?

Thanks.

© Stack Overflow or respective owner

Related posts about python

Related posts about beginner