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
useris created with three keys:name,Address, andsubscription. - The
subscriptionkey contains another dictionary with keystitleandcost. - The code attempts to access the
titleof 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."