20.5k views
5 votes
What is the value of the variable phones after the execution of the following code? phones = {'John': '5555555', 'Julie' : '7777777'} phones['John'] = '1234567'

2 Answers

2 votes

Answer:

phones = {'John': '1234567', 'Julie' : '7777777'}

Step-by-step explanation:

User Rauland
by
4.9k points
3 votes

Answer:

phones = {'John': '1234567', 'Julie' : '7777777'}

Step-by-step explanation:

In the code given in the question phones dictionary contains contains two keys John and Julie and have the values '5555555' and '7777777' respectively. Now in the code the key John in the dictionary phones is assigned the value '1234567' .So the value corresponding to the key John becomes '1234567'.

User Shane Warne
by
5.4k points