On Wed, Jan 13, 2010 at 2:41 AM, Chris Rebert <c...@rebertia.com> wrote:
> On Tue, Jan 12, 2010 at 11:45 PM, Nico Grubert <nicogrub...@gmail.com> wrote:
>> Hi there
>>
>> I have the following list 'mylist' that contains some dictionaries:
>>
>> mylist = [{'title':'the Fog', 'id':1},
>>          {'title':'The Storm', 'id':2},
>>          {'title':'the bible', 'id':3},
>>          {'title':'The thunder', 'id':4}
>>         ]
>
> mylist.sort(key = lambda d: d['title'])

Er, that should have been mylist.sort(key = lambda d:
d['title'].lower())  of course.
<Goes for more coffee>

Cheers,
Chris
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to