sorting in python

Posted by tipu on Stack Overflow See other posts from Stack Overflow or by tipu
Published on 2010-06-03T07:17:40Z Indexed on 2010/06/03 7:24 UTC
Read the original article Hit count: 307

Filed under:
|

I have a hashmap like so:

results[tweet_id] = {"score" : float(dot(query,doc) / (norm(query) * norm(doc))), "tweet" : tweet}

What I'd like to do is to sort results by the innser "score" key. I don't know how possible this is, I saw many sorting tutorials but they were for simple (not nested) data structures.

© Stack Overflow or respective owner

Related posts about python

Related posts about regex