List in Python MCQs Exercise I


Ques 1 List


List is a ..........
  a) Mutable datatype.
  b) Immuatble datatype.
  c) Collection of homogenous element.
  d) None of the above.


a is the correct option





Ques 2 List


Which of the following is the correct Syntax of the List?
  a) list=[1,2,3,4]
  b) tuple=[2,2,3,4]
  c) li=[123,"Small code"]
  d) All of these


d is the correct option





Ques 3 List


What is the output of the following Python Code?


li=["Small Code","Vikas","Chaurasiya"]
print(li[-1::-1])

  a) ayisaruahC]
  b) edoC llamS
  c) ['Chaurasiya', 'Vikas', 'Small code']
  d) Error Occur.


c is the correct option





Ques 4 List


What is the output of the following Python Code?


li=["Small code","Vikas","Chaurasiya"]
for i in li:
    li.del(i)
print(li)

  a) []
  b) Nothing will print
  c) ["Small code","Vikas","Chaurasiya"]
  d) Error Occur.


d is the correct option





Ques 5 List


What is the output of the following Python Code?


li=["SmallCode","Vikas","Chaurasiya"]
for i in li:
    li.pop()
print(li)

  a) ["SmallCode"]
  b) Nothing will print
  c) ["Small code","Vikas","Chaurasiya"]
  d) Error Occur.


a is the correct option