Skip to content

Instantly share code, notes, and snippets.

Last active May 8, 2021 09:58
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
m=input("\nEnter a month:")
print('\nNumber of days in', m,'is',mo.get(m.strip(),'Enter again:'))
print("\nAll months in sorted order are as follows: ",sorted(mo))
for i in mo:
if mo[i]==31:
print ('\nMonth having 31 day is:',i, end=' ')
v=sorted([(i,j) for j,i in mo.items()])
print('\nKey,value pairs in sorted order are:',[(j,i) for i,j in v])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment