List in Python MCQs Exercise II


Ques 1 List


What is the output of the following Python Code?


li=[1,4,2,3,6,4,5]
li.pop(1)
print(li)

  a) [4,2,3,6,4,5]
  b) [1,2,3,6,4,5]
  c) [1,4,2,3,6,4,5]
  d) None of these


b is the correct option





Ques 2 List


What is output of the following Python Code?


li = ['SmallCode','SCode','Tech','Vech']
li.sort()
size1 = len(li[0])
size2 = len(li[-1])
res = size1//size2
print(res)

  a) 2
  b) 3
  c) 0
  d) 1


d is the correct option