Single Choice Not Set

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

ID: #3488 Python Dictionary MCQ 476 views
Question Info
#3488Q ID
Not SetDifficulty
Python Dictionary MCQTopic

Choose the Best Option

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

  • A [4, 8, 16, 32]
  • B [(3, 16), (5, 4), (8, 8), (9, 32)]
  • C [3, 5, 8, 9]
  • D [(4, 5), (8, 8), (16, 3), (32, 9)]
Correct Answer

Explanation

[(3, 16), (5, 4), (8, 8), (9, 32)]

Share This Question

Challenge a friend or share with your study group.