R

Ram Sharma • 193.86K Points
Coach

Q. What will the be the result of below Python code?

Code:
set1={1,2,3}

set1.add(4)

set1.add(4)

print(set1)
  • (A) {1,2,3,4}
  • (B) {1,2,3}
  • (C) {1,2,3,4,4}
  • (D) It will throw an error as same element is added twice

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.