Answer to Question #3395 in Python for mukunda

Question #3395
Add all days in a week to the dictionary with suitable numbers. For instance I give key values as 0 it has to print Sunday and 1 for Monday and so on till Saturday.
1
Expert's answer
2011-08-04T12:32:52-0400
days = { 0:"Sunday", 1:"Monday", 2:"Tuesday", 3:"Wednesday", 4:"Thursday", 5:"Friday", 6:"Saturday" }

print (days[3])

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS