title: sorting a dictionary first by values and then by keys
body: <p>I have a dictionary in python with string keys and integer values. I want to sort by values and If two values were the same, sort dictionary by keys.
  an example of dict. is:</p>
  <pre class="lang-py prettyprint-override"><code>{'Spain':3,'Morocco':1,'England':3,'canada':2}
  </code></pre>
  <p>After sorting It should be:</p>
  <pre class="lang-py prettyprint-override"><code>{'England':3,'Spain':3,'canada':2,'Morocco':1}
  </code></pre>