Python में set को जोड़ने के लिए कौन सी method प्रयोग होती है?
Which method is used to add an element to a set in Python?
A
add()
B
append()
C
insert()
D
extend()
Explanation
-
English:
In Python, to add an element to a set, the method used isadd(). -
हिंदी:
Python में किसी set में element जोड़ने के लिएadd()method का उपयोग किया जाता है।
🔹 Example / उदाहरण:
my_set = {1, 2, 3}
my_set.add(4)
print(my_set) # Output: {1, 2, 3, 4}
Correct Answer: A) add()