MCQ Single Best Answer Not Set

QWhat will be the output after the following statements?
x = {0:4, 1:8, 2:16, 3:32}
print(x.items())

ID: #3487 Python Dictionary MCQ 623 views
Question Info
#3487Q ID
Not SetDifficulty
Python Dictionary MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A dict_items(4, 8, 16, 32)
  • B dict_items([4, 8, 16, 32])
  • C dict_items[0, 1, 2, 3]
  • D dict_items([(0, 4), (1, 8), (2, 16), (3, 32)])
Correct Answer: Option D

Explanation

dict_items([(0, 4), (1, 8), (2, 16), (3, 32)])

Share This Question

Challenge a friend or share with your study group.