Skip to content

Instantly share code, notes, and snippets.

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