Python Lists MCQ: Python Lists Multiple Choice Questions and Answers

Python Lists MCQ with answers and explanations for placement tests and job interviews. This solved Python Lists MCQ is useful for the campus placement for all freshers including Engineering Students, MCA students, Computer and IT Engineers, etc.

Our Python Lists MCQ focuses on all areas of Python and its concept. We will regularly update the quiz and most interesting thing is that questions come in a random sequence. So every time you will feel new questions.

We have already published a blog post that contains short questions on Python If you want you can also see this blog post “Python interview questions“.

 

There are several Python courses that you may have come across during your search for learning Python. Our team of experts has carefully analyzed some Python courses for you. You can check the courses, Trial of some courses is free.

 

Guideline of Python Lists MCQ:

This Python Lists MCQ is intended for checking your Python knowledge. It takes 40 minutes to pass the Python List Quiz. If you don’t finish the Python Lists MCQ within the mentioned time, all the unanswered questions will count as wrong. You can miss the questions by clicking the “Next” button and return to the previous questions by the “Previous” button. Every unanswered question will count as wrong. MCQ on Python Data Types has features of randomization which feel you a new question set at every attempt.

In this Python Lists MCQ, we have also implemented a feature that not allowed the user to see the next question or finish the quiz without attempting the current Python Lists MCQ.

0 votes, 0 avg

You have 40 minutes to take the Python Lists MCQs

Your time has been Over.


Python Lists MCQ

Python MCQ

Python Lists MCQ: Python Lists Multiple Choice Questions and Answers

1 / 29

What is the output of the following Python Programs?

a = ['physics', 'chemistry', 1997, 2000] 
 
print (a[1][-1])

 

2 / 29

How to get 'a'?

x = [10, [3.141, 20, [30, 'baz', 2.718]], 'foo']

 

3 / 29

What is the output of the following Python Programs?

list1 = [1998, 2002] 
list2 = [2014, 2016] 
 
print ((list1 + list2)*2)

 

4 / 29

What is the output of the following Python Programs?

def addToList(listcontainer): 
    listcontainer += [10] 
 
mylistContainer = [10, 20, 30, 40] 
addToList(mylistContainer) 
print (len(mylistContainer))

 

5 / 29

What is the output of the following Python Programs?

def addToList(listcontainer): 
    listcontainer += [10] 
 
mylistContainer = [10, 20, 30, 40] 
addToList(mylistContainer) 
print (len(mylistContainer))

 

6 / 29

Assume the following list definition:

a = ['foo', 'bar', 'baz', 'qux', 'quux', 'corge']

Several short REPL sessions are shown below. Which display correct output?

 

7 / 29

You have a list a defined as follows:

a = [1, 2, 7, 8]

Write a Python statement using slice assignment that will fill in the missing values so that a equals [1, 2, 3, 4, 5, 6, 7, 8].

8 / 29

What is the output of the following Python Programs?

list = [1, 2, 3, None, (1, 2, 3, 4, 5), ['Atic', 'for', 'Atic']] 
print(len(list))

 

9 / 29

What is the output of the following Python Programs?

list = ['a', 'b', 'c', 'd', 'e'] 
print(list[10:] )

 

10 / 29

Select all the correct options to copy a list

List1 = ['a', 'b', 'c', 'd']

 

11 / 29

What is the output of the following Python Programs?

temp = 'Aticleworld 22536 for 445 Atic'
data = [x for x in (int(x) for x in temp if x.isdigit()) if x%2 == 0] 
print(data)

 

12 / 29

What is the output of the following Python Programs?

list1 = [1, 2, 3, 4, 5] 
list2 = list1 
 
list2[0] = 0; 
 
print( list1)

 

13 / 29

What is the output of the following Python Programs?

data = [2, 3, 9] 
temp = [[x for x in[data]] for x in range(3)] 
print (temp)

 

14 / 29

List a is defined as follows:

a = [1, 2, 3, 4, 5]

Select all of the following statements that remove the middle element 3 from a so that it equals [1, 2, 4, 5]:

15 / 29

What is the output of the following Python Programs?

list1 = range(100, 110) 
 
print (list1.index(105))

 

16 / 29

Which of the following are true of Python lists?

17 / 29

What is the output of the following Python Programs?

list = ['a', 'b', 'c'] * -3
print(list)

18 / 29

What is the output of the following Python Programs?

L1 = [1, 1.33, 'Atic', 0, 'NO', None, 'A', True] 
val1, val2 = 0, '' 
for x in L1: 
    if(type(x) == int or type(x) == float): 
        val1 += x 
    elif(type(x) == str): 
        val2 += x 
    else: 
        break
print(val1, val2)

 

19 / 29

What is the output of the following Python Programs?

atic = [1, 2, 3, 4] 
 
atic.append([5,6,7,8]) 
 
print(atic)

 

20 / 29

What is the output of the following Python Programs?

list = ['atic', 'learning', '@', 'Atic', 'for', 'Aticleworld'] 
 
print(list[0:6:2])

 

21 / 29

What is the output of the below python code?

x = [10, [3.141, 20, [30, 'baz', 2.718]], 'foo']

print(x[1][2][1][2])

 

22 / 29

What is the output of the following Python Programs?

temp = ['Atic', 'for', 'Aticleworld'] 
arr = [i[0].upper() for i in temp] 
print(arr)

23 / 29

What is the output of the following Python Programs?

def atic(x,l=[]): 
    for i in range(x): 
        l.append(i*i) 
    print(l) 
 
atic(3,[3,2,1])

 

24 / 29

What expression returns the list ['baz', 2.718]?

x = [10, [3.141, 20, [30, 'baz', 2.718]], 'foo']

 

25 / 29

What is the output of the following Python Programs?

data = [x for x in range(5)] 
temp = [x for x in range(7) if x in data and x%2==0] 
print(temp)

26 / 29

Find the output of the following program:

nameList = ['Harsh', 'Pratik', 'Bob', 'Dhruv'] 
 
print nameList[1][-1]

 

27 / 29

What is the output of the following Python Programs?

L1 = []
L1.append([1, [2, 3], 4]) 
L1.extend([7, 8, 9]) 
print(L1[0][1][1] + L1[2])

 

28 / 29

What is the output of the following Python Programs?

check1 = ['Learn', 'Quiz', 'Practice', 'Contribute'] 
check2 = check1 
check3 = check1[:] 
 
check2[0] = 'Atic'
check3[1] = 'Mcq'
 
count = 0
for c in (check1, check2, check3): 
    if c[0] == 'Code': 
        count += 1
    if c[1] == 'Mcq': 
        count += 10
 
print (count)

 

29 / 29

List a is defined as follows:

a = ['a', 'b', 'c']

Which of the following statements adds 'd' and 'e' to the end of a, so that it then equals ['a', 'b', 'c', 'd', 'e']:

Your score is

The average score is 0%

0%

Recommended Articles for you: