CBSE CS ## List in Python

##### MCQ on List

Click on the buttons inside the tabbed menu:

### MCQ Set 1

List Multiple choice question in Python

1 List can contain values of these types:

2 Which of the following will create an empty list ?

3 Which of the following will return the last element of a list L with 5 elements?

4 If L=[1,2] then L*2 will yield

5 L1=[1,3,5] and L2=[2,4,6] then L1 + L2

6 Given a list L=[10,20,30,40,50,60,70], what would L[1:4] return?

7 Given a list L=[10,20,30,40,50,60,70], what would L[2:-2] return?

8 Given a list L=[10,20,30,40,50,60,70], what would L[-4:-1] return?

9 Given a list L=[10,20,30,40,50,60,70], then L[-3:]

10 To find the last element of list namely 'smiles' in Python ,_____ will be used.

### LIST MCQ Set 2

List Multiple choice question in Python

11 What is printed by the Python code?
print(list(range(3)))

12 Which of the following commands will create a list?

13 What si the output when we execute list('hello')?

14 What gets printed?
names=['Hasan','Balwant','Sean','Dia']
print(names[-1][-1])

15 What is the output of the following :
l=[None]*10
print(len(l))