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.
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
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.
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.
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.