Answer to Question #3389 in Python for mukunda

Question #3389
Write a program to create a dictionary and store student id as key and student name as value and display the student id and name. After displaying the dictionary keys and values you should clear the dictionary so that your dictionary becomes empty.
1
Expert's answer
2011-08-04T12:29:36-0400
db = { 12324:"John Smith", 12346:"William Bakenstuff", 12423:"Sam Zoom" }

for k in db.keys():
print(k, db[k])

db = { }

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