title: Sort a dictionary by key, and then take values from a particular key
body: <p>So I have some storm data that I've sorted into dictionaries, with the <strong>key</strong> being the year the storm occurred. The <strong>value</strong> of the main dictionary is actually another dictionary, with the storm name as the <strong>key</strong> for the inner dictionary.</p>
  
  <p>After I've created all the dictionaries, I ask the user for an input, and store that input as the variable <code>year</code> which gets passed to the function that I want to use to display the data, let's call it <code>display_info(dictionary, year)</code>.</p>
  
  <p>Sidenote: I have a <code>main()</code> function that actually takes the input for year, and other functions that edit and return the dictionary, so what I have here isn't complete, it's just this one function that I need help with.</p>
  
  <pre><code>year = input("Input a year: ")
  
  def display_info(dictionary, year):
      '''Displays the storm info for the year input'''
  
      for k,v in dictionary.items():     
          if k == year:
              print(k, v)
  </code></pre>
  
  <p>I've tried a few different variations of this, but none seem to get the job done.</p>