title: Sort python dictionary by Keys formatted as strings
body: <p>I have a dictionary with strings as keys formatted as yyyy-mm-dd and want to sort the dictionary by keys with the earliest dates first:</p>
  
  <p>I am currently using <code>sorted(datesAndText.keys())</code> but this isn't reliably working because the month and day fields are not always zero padded.</p>
  
  <p>I have looked at <a href="https://stackoverflow.com/questions/11908686/sort-python-dictionary-by-date-keys">Sort python dictionary by date keys</a> and <a href="https://stackoverflow.com/questions/2589479/how-do-i-sort-this-list-in-python-if-my-date-is-in-a-string">How do I sort this list in Python, if my date is in a String?</a> but I can't seem to adopt them to by specific case.</p>