Python_Institute
PCEP-30-02 · Question #362
Assuming that Barry Lyndon has the following phone number: 5551234567 Arrange the code boxes to create a valid line of code, which makes a relevant phone directory entry within the phone_dir…
The correct line of code to create the phone directory entry is: phone_dir = {"Barry Lyndon": "5551234567"}
Module 4: Functions, Tuples, Dictionaries, and Data Processing
Question
Assuming that Barry Lyndon has the following phone number: 5551234567 Arrange the code boxes to create a valid line of code, which makes a relevant phone directory entry within the phone_dir dictionary (note: "Barry Lyndon" is the key).
Explanation
The correct line of code to create the phone directory entry is: phone_dir = {"Barry Lyndon": "5551234567"}
Topics
#dictionary#key-value pairs#dictionary assignment#string keys
Community Discussion
No community discussion yet for this question.