Close
Close

how to sort dictionary according to the marks?

   Prathamesh Saraf , D.K.T.E. Ichalajaranji

dictionary q.2

we kan sort dictionary according to keys but haow can we sort is based on values? coz’ marks are values of dictionary in abouve example.

  • got it thanks!!
    - Prathamesh Saraf

Answers

  •   

    for key in sorted(student):

    … print(“%s: %s” %( key,student[key] ) )



  •    seoexpertim

    I must admit that your post is really interesting. I have spent a lot of my spare time reading your content. Thank you a lot! fashion 1921



Ask Yours
Post Yours
Write your answer