The provided code is as follows:
user = { 'name': 'Bruce', 'Address' : 'Gotham', 'subscription' : { 'title' : 'Student Bundle', 'cost' : 1000 } }
print(user.get('subscription').get('title'))
In this code:
- A dictionary
user
is created with three keys:name
,Address
, andsubscription
. - The
subscription
key contains another dictionary with keystitle
andcost
. - The code attempts to access the
title
of thesubscription
.
The output of the print
statement is the value associated with the title
key inside the subscription
dictionary, which is 'Student Bundle'.
So, the final output will be:
Student Bundle
Thus, the correct response is "Student Bundle."