Check sibling questions
Computer Science - Class 12
Solutions to CBSE Sample Paper - Computer Science Class 12

What will be the output of the following code?

D1 = {‘name’: ‘Alice’, ‘age’: 20, ‘gender’: ‘F’} 

D2 = D1.popitem() 



  1. {‘name’: ‘Alice’, ‘age’: 20} (‘gender’, ‘F’) 

  2. {‘name’: ‘Alice’, ‘gender’: ‘F’} (‘age’, 20) 

  3. {‘age’: 20, ‘gender’: ‘F’} (‘name’, ‘Alice’)

  4. Error


Answer by student

a. {‘name’: ‘Alice’, ‘age’: 20} (‘gender’, ‘F’)

Detailed answer by teachoo

The rest of the post is locked. Join Teachoo Black to see the full post.

Learn in your speed, with individual attention - Teachoo Maths 1-on-1 Class

Ask a doubt
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 13 years. He provides courses for Maths, Science, Social Science, Physics, Chemistry, Computer Science at Teachoo.