Problem 1 (Displaying a Dictionary) Add the following function display (d) that takes a dictionary as a parameter to your program. This function prints the elements of the dictionary to the terminal (in no particular order). def display (d): for key in d: print(key,":", d[key]) Sample run: >>> d = {'a':1, 'b':2, 'c':3} >>> print (d) {'a': 1, 'b': 2, 'c': 3} >>> display (d) a: 1 b: 2 C: 3
Problem 1 (Displaying a Dictionary) Add the following function display (d) that takes a dictionary as a parameter to your program. This function prints the elements of the dictionary to the terminal (in no particular order). def display (d): for key in d: print(key,":", d[key]) Sample run: >>> d = {'a':1, 'b':2, 'c':3} >>> print (d) {'a': 1, 'b': 2, 'c': 3} >>> display (d) a: 1 b: 2 C: 3
Related questions
Question
Please I would love to have a cleared zoom in screenshot of code!!. Thanks. IN PYTHON PLEASE
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.