how to order a dictionary based on key by daywise in python











up vote
1
down vote

favorite












I had 2 list



daydate=['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']

percentday=['0%', '17%', '27%', '11%', '7%', '19%', '19%']


i have converted into dictionary by doing



daydic=dict(zip(daydate, percentday))



the output is coming like



{'Monday': '17%', 'Tuesday': '27%', 'Friday': '19%', 'Wednesday': '11%', 'Thursday': '7%', 'Sunday': '0%', 'Saturday': '19%'}


i want to sort this dictionary like the order of elements in daywise like below



{'Sunday': '0%','Monday': '17%', 'Tuesday': '27%', 'Wednesday': '11%', 'Thursday': '7%', , 'Friday': '19%','Saturday': '19%'}


Help me










share|improve this question




















  • 3




    Dictionaries don't have a sorting. You can sort it when you print, by sorting the keys
    – planetmaker
    Nov 19 at 12:39








  • 1




    @TomdeGeus: i want to sort by daywise,i.e., week day wise. Anyway thanks
    – vtustudent
    Nov 19 at 12:41















up vote
1
down vote

favorite












I had 2 list



daydate=['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']

percentday=['0%', '17%', '27%', '11%', '7%', '19%', '19%']


i have converted into dictionary by doing



daydic=dict(zip(daydate, percentday))



the output is coming like



{'Monday': '17%', 'Tuesday': '27%', 'Friday': '19%', 'Wednesday': '11%', 'Thursday': '7%', 'Sunday': '0%', 'Saturday': '19%'}


i want to sort this dictionary like the order of elements in daywise like below



{'Sunday': '0%','Monday': '17%', 'Tuesday': '27%', 'Wednesday': '11%', 'Thursday': '7%', , 'Friday': '19%','Saturday': '19%'}


Help me










share|improve this question




















  • 3




    Dictionaries don't have a sorting. You can sort it when you print, by sorting the keys
    – planetmaker
    Nov 19 at 12:39








  • 1




    @TomdeGeus: i want to sort by daywise,i.e., week day wise. Anyway thanks
    – vtustudent
    Nov 19 at 12:41













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I had 2 list



daydate=['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']

percentday=['0%', '17%', '27%', '11%', '7%', '19%', '19%']


i have converted into dictionary by doing



daydic=dict(zip(daydate, percentday))



the output is coming like



{'Monday': '17%', 'Tuesday': '27%', 'Friday': '19%', 'Wednesday': '11%', 'Thursday': '7%', 'Sunday': '0%', 'Saturday': '19%'}


i want to sort this dictionary like the order of elements in daywise like below



{'Sunday': '0%','Monday': '17%', 'Tuesday': '27%', 'Wednesday': '11%', 'Thursday': '7%', , 'Friday': '19%','Saturday': '19%'}


Help me










share|improve this question















I had 2 list



daydate=['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']

percentday=['0%', '17%', '27%', '11%', '7%', '19%', '19%']


i have converted into dictionary by doing



daydic=dict(zip(daydate, percentday))



the output is coming like



{'Monday': '17%', 'Tuesday': '27%', 'Friday': '19%', 'Wednesday': '11%', 'Thursday': '7%', 'Sunday': '0%', 'Saturday': '19%'}


i want to sort this dictionary like the order of elements in daywise like below



{'Sunday': '0%','Monday': '17%', 'Tuesday': '27%', 'Wednesday': '11%', 'Thursday': '7%', , 'Friday': '19%','Saturday': '19%'}


Help me







python list dictionary calendar ordereddict






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 19 at 12:53

























asked Nov 19 at 12:36









vtustudent

276




276








  • 3




    Dictionaries don't have a sorting. You can sort it when you print, by sorting the keys
    – planetmaker
    Nov 19 at 12:39








  • 1




    @TomdeGeus: i want to sort by daywise,i.e., week day wise. Anyway thanks
    – vtustudent
    Nov 19 at 12:41














  • 3




    Dictionaries don't have a sorting. You can sort it when you print, by sorting the keys
    – planetmaker
    Nov 19 at 12:39








  • 1




    @TomdeGeus: i want to sort by daywise,i.e., week day wise. Anyway thanks
    – vtustudent
    Nov 19 at 12:41








3




3




Dictionaries don't have a sorting. You can sort it when you print, by sorting the keys
– planetmaker
Nov 19 at 12:39






Dictionaries don't have a sorting. You can sort it when you print, by sorting the keys
– planetmaker
Nov 19 at 12:39






1




1




@TomdeGeus: i want to sort by daywise,i.e., week day wise. Anyway thanks
– vtustudent
Nov 19 at 12:41




@TomdeGeus: i want to sort by daywise,i.e., week day wise. Anyway thanks
– vtustudent
Nov 19 at 12:41












3 Answers
3






active

oldest

votes

















up vote
6
down vote













Dictionaries should not be considered ordered



They are, in fact, insertion ordered in Python 3.6+ (officially 3.7+), but even so you should prefer to use OrderedDict for a robust ordered mapping.



In addition, you should never have to type days of the week manually, you can import from calendar.day_name and rotate via deque:



from calendar import day_name
from collections import deque, OrderedDict

daydate = deque(day_name)
daydate.rotate(1)

percentday = ['0%', '17%', '27%', '11%', '7%', '19%', '19%']

res = OrderedDict(zip(daydate, percentday))

OrderedDict([('Sunday', '0%'),
('Monday', '17%'),
('Tuesday', '27%'),
('Wednesday', '11%'),
('Thursday', '7%'),
('Friday', '19%'),
('Saturday', '19%')])





share|improve this answer




























    up vote
    0
    down vote













    As told, a dict is not ordered, but you can order before to convert to dict.



    daydate=['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
    percentday=['0%', '17%', '27%', '11%', '7%', '19%', '19%']


    Sort by day, just rotate the zip:



    dayzip = list(zip(daydate, percentday))
    dayzip = dayzip[1-len(dayzip):] + dayzip[:1-len(dayzip)]
    daydict = dict(dayzip)

    #=> {'Sunday': '0%', 'Monday': '17%', 'Tuesday': '27%', 'Wednesday': '11%', 'Thursday': '7%', 'Friday': '19%', 'Saturday': '19%'}


    To sort by percentage:



    dayzip = list(zip(daydate, percentday))
    dayzip.sort(key=lambda x: float(x[1][:-1]) )
    daydict = dict(dayzip)


    #=> [('Sunday', '0%'), ('Monday', '17%'), ('Tuesday', '27%'), ('Wednesday', '11%'), ('Thursday', '7%'), ('Friday', '19%'), ('Saturday', '19%')]
    #=> {'Sunday': '0%', 'Thursday': '7%', 'Wednesday': '11%', 'Monday': '17%', 'Friday': '19%', 'Saturday': '19%', 'Tuesday': '27%'}





    share|improve this answer























    • But OP wants to sort by day, not by value.
      – jpp
      Nov 19 at 12:46










    • Oops! In case, rotate stackoverflow.com/questions/9457832/python-list-rotation. I''l edit.
      – iGian
      Nov 19 at 12:48


















    up vote
    0
    down vote













    You can try this:



    from collections import OrderedDict
    daydic={'Friday': '19%', 'Wednesday': '11%', 'Monday': '17%', 'Thursday': '7%', 'Saturday': '19%', 'Sunday': '0%', 'Tuesday': '27%'}
    weeks=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']
    print(OrderedDict(sorted(daydic.items(),key =lambda x:weeks.index(x[0]))))


    This will output as:



    OrderedDict([('Sunday', '0%'), ('Monday', '17%'), ('Tuesday', '27%'), ('Wednesday', '11%'),
    ('Thursday', '7%'), ('Friday', '19%'), ('Saturday', '19%')])





    share|improve this answer





















      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53374820%2fhow-to-order-a-dictionary-based-on-key-by-daywise-in-python%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      6
      down vote













      Dictionaries should not be considered ordered



      They are, in fact, insertion ordered in Python 3.6+ (officially 3.7+), but even so you should prefer to use OrderedDict for a robust ordered mapping.



      In addition, you should never have to type days of the week manually, you can import from calendar.day_name and rotate via deque:



      from calendar import day_name
      from collections import deque, OrderedDict

      daydate = deque(day_name)
      daydate.rotate(1)

      percentday = ['0%', '17%', '27%', '11%', '7%', '19%', '19%']

      res = OrderedDict(zip(daydate, percentday))

      OrderedDict([('Sunday', '0%'),
      ('Monday', '17%'),
      ('Tuesday', '27%'),
      ('Wednesday', '11%'),
      ('Thursday', '7%'),
      ('Friday', '19%'),
      ('Saturday', '19%')])





      share|improve this answer

























        up vote
        6
        down vote













        Dictionaries should not be considered ordered



        They are, in fact, insertion ordered in Python 3.6+ (officially 3.7+), but even so you should prefer to use OrderedDict for a robust ordered mapping.



        In addition, you should never have to type days of the week manually, you can import from calendar.day_name and rotate via deque:



        from calendar import day_name
        from collections import deque, OrderedDict

        daydate = deque(day_name)
        daydate.rotate(1)

        percentday = ['0%', '17%', '27%', '11%', '7%', '19%', '19%']

        res = OrderedDict(zip(daydate, percentday))

        OrderedDict([('Sunday', '0%'),
        ('Monday', '17%'),
        ('Tuesday', '27%'),
        ('Wednesday', '11%'),
        ('Thursday', '7%'),
        ('Friday', '19%'),
        ('Saturday', '19%')])





        share|improve this answer























          up vote
          6
          down vote










          up vote
          6
          down vote









          Dictionaries should not be considered ordered



          They are, in fact, insertion ordered in Python 3.6+ (officially 3.7+), but even so you should prefer to use OrderedDict for a robust ordered mapping.



          In addition, you should never have to type days of the week manually, you can import from calendar.day_name and rotate via deque:



          from calendar import day_name
          from collections import deque, OrderedDict

          daydate = deque(day_name)
          daydate.rotate(1)

          percentday = ['0%', '17%', '27%', '11%', '7%', '19%', '19%']

          res = OrderedDict(zip(daydate, percentday))

          OrderedDict([('Sunday', '0%'),
          ('Monday', '17%'),
          ('Tuesday', '27%'),
          ('Wednesday', '11%'),
          ('Thursday', '7%'),
          ('Friday', '19%'),
          ('Saturday', '19%')])





          share|improve this answer












          Dictionaries should not be considered ordered



          They are, in fact, insertion ordered in Python 3.6+ (officially 3.7+), but even so you should prefer to use OrderedDict for a robust ordered mapping.



          In addition, you should never have to type days of the week manually, you can import from calendar.day_name and rotate via deque:



          from calendar import day_name
          from collections import deque, OrderedDict

          daydate = deque(day_name)
          daydate.rotate(1)

          percentday = ['0%', '17%', '27%', '11%', '7%', '19%', '19%']

          res = OrderedDict(zip(daydate, percentday))

          OrderedDict([('Sunday', '0%'),
          ('Monday', '17%'),
          ('Tuesday', '27%'),
          ('Wednesday', '11%'),
          ('Thursday', '7%'),
          ('Friday', '19%'),
          ('Saturday', '19%')])






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 19 at 12:42









          jpp

          86.2k194898




          86.2k194898
























              up vote
              0
              down vote













              As told, a dict is not ordered, but you can order before to convert to dict.



              daydate=['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
              percentday=['0%', '17%', '27%', '11%', '7%', '19%', '19%']


              Sort by day, just rotate the zip:



              dayzip = list(zip(daydate, percentday))
              dayzip = dayzip[1-len(dayzip):] + dayzip[:1-len(dayzip)]
              daydict = dict(dayzip)

              #=> {'Sunday': '0%', 'Monday': '17%', 'Tuesday': '27%', 'Wednesday': '11%', 'Thursday': '7%', 'Friday': '19%', 'Saturday': '19%'}


              To sort by percentage:



              dayzip = list(zip(daydate, percentday))
              dayzip.sort(key=lambda x: float(x[1][:-1]) )
              daydict = dict(dayzip)


              #=> [('Sunday', '0%'), ('Monday', '17%'), ('Tuesday', '27%'), ('Wednesday', '11%'), ('Thursday', '7%'), ('Friday', '19%'), ('Saturday', '19%')]
              #=> {'Sunday': '0%', 'Thursday': '7%', 'Wednesday': '11%', 'Monday': '17%', 'Friday': '19%', 'Saturday': '19%', 'Tuesday': '27%'}





              share|improve this answer























              • But OP wants to sort by day, not by value.
                – jpp
                Nov 19 at 12:46










              • Oops! In case, rotate stackoverflow.com/questions/9457832/python-list-rotation. I''l edit.
                – iGian
                Nov 19 at 12:48















              up vote
              0
              down vote













              As told, a dict is not ordered, but you can order before to convert to dict.



              daydate=['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
              percentday=['0%', '17%', '27%', '11%', '7%', '19%', '19%']


              Sort by day, just rotate the zip:



              dayzip = list(zip(daydate, percentday))
              dayzip = dayzip[1-len(dayzip):] + dayzip[:1-len(dayzip)]
              daydict = dict(dayzip)

              #=> {'Sunday': '0%', 'Monday': '17%', 'Tuesday': '27%', 'Wednesday': '11%', 'Thursday': '7%', 'Friday': '19%', 'Saturday': '19%'}


              To sort by percentage:



              dayzip = list(zip(daydate, percentday))
              dayzip.sort(key=lambda x: float(x[1][:-1]) )
              daydict = dict(dayzip)


              #=> [('Sunday', '0%'), ('Monday', '17%'), ('Tuesday', '27%'), ('Wednesday', '11%'), ('Thursday', '7%'), ('Friday', '19%'), ('Saturday', '19%')]
              #=> {'Sunday': '0%', 'Thursday': '7%', 'Wednesday': '11%', 'Monday': '17%', 'Friday': '19%', 'Saturday': '19%', 'Tuesday': '27%'}





              share|improve this answer























              • But OP wants to sort by day, not by value.
                – jpp
                Nov 19 at 12:46










              • Oops! In case, rotate stackoverflow.com/questions/9457832/python-list-rotation. I''l edit.
                – iGian
                Nov 19 at 12:48













              up vote
              0
              down vote










              up vote
              0
              down vote









              As told, a dict is not ordered, but you can order before to convert to dict.



              daydate=['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
              percentday=['0%', '17%', '27%', '11%', '7%', '19%', '19%']


              Sort by day, just rotate the zip:



              dayzip = list(zip(daydate, percentday))
              dayzip = dayzip[1-len(dayzip):] + dayzip[:1-len(dayzip)]
              daydict = dict(dayzip)

              #=> {'Sunday': '0%', 'Monday': '17%', 'Tuesday': '27%', 'Wednesday': '11%', 'Thursday': '7%', 'Friday': '19%', 'Saturday': '19%'}


              To sort by percentage:



              dayzip = list(zip(daydate, percentday))
              dayzip.sort(key=lambda x: float(x[1][:-1]) )
              daydict = dict(dayzip)


              #=> [('Sunday', '0%'), ('Monday', '17%'), ('Tuesday', '27%'), ('Wednesday', '11%'), ('Thursday', '7%'), ('Friday', '19%'), ('Saturday', '19%')]
              #=> {'Sunday': '0%', 'Thursday': '7%', 'Wednesday': '11%', 'Monday': '17%', 'Friday': '19%', 'Saturday': '19%', 'Tuesday': '27%'}





              share|improve this answer














              As told, a dict is not ordered, but you can order before to convert to dict.



              daydate=['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
              percentday=['0%', '17%', '27%', '11%', '7%', '19%', '19%']


              Sort by day, just rotate the zip:



              dayzip = list(zip(daydate, percentday))
              dayzip = dayzip[1-len(dayzip):] + dayzip[:1-len(dayzip)]
              daydict = dict(dayzip)

              #=> {'Sunday': '0%', 'Monday': '17%', 'Tuesday': '27%', 'Wednesday': '11%', 'Thursday': '7%', 'Friday': '19%', 'Saturday': '19%'}


              To sort by percentage:



              dayzip = list(zip(daydate, percentday))
              dayzip.sort(key=lambda x: float(x[1][:-1]) )
              daydict = dict(dayzip)


              #=> [('Sunday', '0%'), ('Monday', '17%'), ('Tuesday', '27%'), ('Wednesday', '11%'), ('Thursday', '7%'), ('Friday', '19%'), ('Saturday', '19%')]
              #=> {'Sunday': '0%', 'Thursday': '7%', 'Wednesday': '11%', 'Monday': '17%', 'Friday': '19%', 'Saturday': '19%', 'Tuesday': '27%'}






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Nov 19 at 12:52

























              answered Nov 19 at 12:45









              iGian

              2,6292621




              2,6292621












              • But OP wants to sort by day, not by value.
                – jpp
                Nov 19 at 12:46










              • Oops! In case, rotate stackoverflow.com/questions/9457832/python-list-rotation. I''l edit.
                – iGian
                Nov 19 at 12:48


















              • But OP wants to sort by day, not by value.
                – jpp
                Nov 19 at 12:46










              • Oops! In case, rotate stackoverflow.com/questions/9457832/python-list-rotation. I''l edit.
                – iGian
                Nov 19 at 12:48
















              But OP wants to sort by day, not by value.
              – jpp
              Nov 19 at 12:46




              But OP wants to sort by day, not by value.
              – jpp
              Nov 19 at 12:46












              Oops! In case, rotate stackoverflow.com/questions/9457832/python-list-rotation. I''l edit.
              – iGian
              Nov 19 at 12:48




              Oops! In case, rotate stackoverflow.com/questions/9457832/python-list-rotation. I''l edit.
              – iGian
              Nov 19 at 12:48










              up vote
              0
              down vote













              You can try this:



              from collections import OrderedDict
              daydic={'Friday': '19%', 'Wednesday': '11%', 'Monday': '17%', 'Thursday': '7%', 'Saturday': '19%', 'Sunday': '0%', 'Tuesday': '27%'}
              weeks=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']
              print(OrderedDict(sorted(daydic.items(),key =lambda x:weeks.index(x[0]))))


              This will output as:



              OrderedDict([('Sunday', '0%'), ('Monday', '17%'), ('Tuesday', '27%'), ('Wednesday', '11%'),
              ('Thursday', '7%'), ('Friday', '19%'), ('Saturday', '19%')])





              share|improve this answer

























                up vote
                0
                down vote













                You can try this:



                from collections import OrderedDict
                daydic={'Friday': '19%', 'Wednesday': '11%', 'Monday': '17%', 'Thursday': '7%', 'Saturday': '19%', 'Sunday': '0%', 'Tuesday': '27%'}
                weeks=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']
                print(OrderedDict(sorted(daydic.items(),key =lambda x:weeks.index(x[0]))))


                This will output as:



                OrderedDict([('Sunday', '0%'), ('Monday', '17%'), ('Tuesday', '27%'), ('Wednesday', '11%'),
                ('Thursday', '7%'), ('Friday', '19%'), ('Saturday', '19%')])





                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  You can try this:



                  from collections import OrderedDict
                  daydic={'Friday': '19%', 'Wednesday': '11%', 'Monday': '17%', 'Thursday': '7%', 'Saturday': '19%', 'Sunday': '0%', 'Tuesday': '27%'}
                  weeks=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']
                  print(OrderedDict(sorted(daydic.items(),key =lambda x:weeks.index(x[0]))))


                  This will output as:



                  OrderedDict([('Sunday', '0%'), ('Monday', '17%'), ('Tuesday', '27%'), ('Wednesday', '11%'),
                  ('Thursday', '7%'), ('Friday', '19%'), ('Saturday', '19%')])





                  share|improve this answer












                  You can try this:



                  from collections import OrderedDict
                  daydic={'Friday': '19%', 'Wednesday': '11%', 'Monday': '17%', 'Thursday': '7%', 'Saturday': '19%', 'Sunday': '0%', 'Tuesday': '27%'}
                  weeks=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']
                  print(OrderedDict(sorted(daydic.items(),key =lambda x:weeks.index(x[0]))))


                  This will output as:



                  OrderedDict([('Sunday', '0%'), ('Monday', '17%'), ('Tuesday', '27%'), ('Wednesday', '11%'),
                  ('Thursday', '7%'), ('Friday', '19%'), ('Saturday', '19%')])






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 19 at 12:53









                  Somya Avasthi

                  414




                  414






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53374820%2fhow-to-order-a-dictionary-based-on-key-by-daywise-in-python%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Costa Masnaga

                      Fotorealismo

                      Sidney Franklin