Use the code to answer the question. %0D%0A%0D%0Auser = { %0D%0A 'name': 'Parker', %0D%0A 'Address' : 'London', %0D%0A 'subscription' : { %0D%0A 'title' : 'Student Bundle', %0D%0A 'cost' : 1000, %0D%0A 'valid_till' : { %0D%0A 'month': 'Jan', %0D%0A 'year': 2022, %0D%0A 'date': 2 %0D%0A } %0D%0A } %0D%0A} %0D%0ADemonstrate how can we display the value of key “year” using the get method in the code.%0D%0A%0D%0A(1 point)%0D%0AResponses%0D%0A%0D%0Aprint(user.get(subscription).get(valid_till).get(year))%0D%0Aprint(user.get(subscription).get(valid_till).get(year))%0D%0A%0D%0Aprint(user.get('subscription').get('valid_till').get('year'))%0D%0Aprint(user.get('subscription').get('valid_till').get('year'))%0D%0A%0D%0Aprint(user.['subscription']['valid_till']['year'])%0D%0Aprint(user.['subscription']['valid_till']['year'])%0D%0A%0D%0Aprint(user.get('valid_till').get('subscription').get('year'))
1 answer
print(user.get('subscription').get('valid_till').get('year'))