Set in Python MCQs Exercise II


Ques 1 Set


What is the output of the following Python Code?


se={11,12,13}
se.pop()
print(se)

  a) {12,13}
  b) Set is immutable.
  c) {11,12}
  d) Error


a is the correct option





Ques 2 Set


What is the output of the following Python Code?


s1 = {10 , 20, 30}
s2 = {30, 40, 60}
print(len(s1 + s2))

  a) 5
  b) 6
  c) 3
  d) Error


d is the correct option