Programming Language Python Set MCQ Question #3802
Single Choice Not Set

QWhat is the output of the following
sampleSet = {"Yellow", "Orange", "Black"}
sampleSet.add("Blue")
sampleSet.add("Orange")
print(sampleSet)

ID: #3802 Python Set MCQ 201 views
Question Info
#3802Q ID
Not SetDifficulty
Python Set MCQTopic

Choose the Best Option

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

  • A {
  • B {
Correct Answer

Explanation

{‘Blue’, ‘Orange’, ‘Yellow’, ‘Black’}

Python set doesn’t allow duplicate items.

Share This Question

Challenge a friend or share with your study group.