Question: Complete the loop so that it has the following output. >>> plays = { 'Macbeth': 'William Shakespeare', ... 'A Streetcar Named Desire': 'Tennessee Williams',

Complete the loop so that it has the following output. >>> plays 


Complete the loop so that it has the following output. >>> plays = { 'Macbeth': 'William Shakespeare', ... 'A Streetcar Named Desire': 'Tennessee Williams', 'Amadeus': 'Peter Shaffer' } >>> for title in plays. print( William Shakespeare wrote Macbeth 'wrote', Tennessee Williams wrote A Streetcar Named Desire Peter Shaffer wrote Amadeus

Step by Step Solution

3.40 Rating (150 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To achieve the desired output you can iterate through the d... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!