MCQ
Single Best Answer
Not Set
QSelect all the correct ways to copy two sets
ID: #3809
Python Set MCQ
212 views
Question Info
#3809Q ID
Not SetDifficulty
Python Set MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option A
Explanation
When you set set2= set11, you are making them refer to the same dict object, so when you modify one of them, all references associated with that object reflect the current state of the object. So don’t use the assignment operator to copy the set instead use the copy() method or set() constructor.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic