Single Choice Not Set

QWhat is the output of the following set operation
sampleSet = {"Yellow", "Orange", "Black"}
sampleSet.update(["Blue", "Green", "Red"])
print(sampleSet)

ID: #3804 Python Set MCQ 240 views
Question Info
#3804Q ID
Not SetDifficulty
Python Set MCQTopic

Choose the Best Option

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

  • A {
  • B {
  • C TypeError: update() doesn
Correct Answer

Explanation

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

We can update multiple items using the update() method.

Share This Question

Challenge a friend or share with your study group.