fork download
  1. year=input("Input a year: ")
  2.  
  3. def display_info(dictionary,year):
  4. '''Displays the storm info for the year input'''
  5.  
  6. for k,v in dictionary.items():
  7. if k==year:
  8. print(k,v)
  9.  
  10. d = {"2017": {"name": "Susan"}}
  11. display_info(d, year)
Success #stdin #stdout 0.02s 28384KB
stdin
2017
stdout
Input a year: 2017 {'name': 'Susan'}