N
Nico Grubert
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}
]
How I can sort (case insensitive) the list by the dictioary's 'title' key?
The result should be this list:
[{'title':'the bible', 'id':3},
{'title':'the Fog', 'id':1},
{'title':'The Storm', 'id':2},
{'title':'The thunder', 'id':4}
]
I am using Python 2.4.
Regards,
Nico
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}
]
How I can sort (case insensitive) the list by the dictioary's 'title' key?
The result should be this list:
[{'title':'the bible', 'id':3},
{'title':'the Fog', 'id':1},
{'title':'The Storm', 'id':2},
{'title':'The thunder', 'id':4}
]
I am using Python 2.4.
Regards,
Nico