Question: What does the following code print? names = { ' Janice ' : 5 , 'Emily': 3 , 'John': 7 , 'Eleanor': 2 } list
What does the following code print?
names Janice: 'Emily': 'John': 'Eleanor':
listonames
for name in names:
if namesname:
listonames.appendname
printlistonames
Question options:
Janice 'John'
Janice 'Emily', 'Eleanor'
John
Janice 'Emily', 'John', 'Eleanor'
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
