Python List MCQs: 12 Solved Questions with Explanations

Test Python list tracing with 12 exam-attributed MCQs on syntax, indexing, slicing, mutation, nested pop calls and sorting, with worked answers.

KnowledgeGate Team

Exam prep & CS education

Updated 22 Nov 20267 min read
Python List MCQs: 12 Solved Questions with Explanations

Python list questions look short, but one index, slice bound or mutating method can change the object before the next expression is evaluated. Trace the syntax, indices, slices and mutations in order, and predict the output and final list state before checking the answer. The Python Course: Concepts, MCQs & Coding places these list skills in a wider language sequence.

Python list syntax, construction and length

Start with items = ['PM', 2, False]. Square brackets create the list, while the three comma-separated objects make len(items) == 3. Mixed element types do not affect the count. Also distinguish list('PEACE'), which consumes five characters one at a time, from ['PEACE'], which contains one complete string. First decide whether code constructs a list or inspects one, then count top-level elements.

Question 1 (HTET 2023)

In python elements of the list are written inside :

  • A. [ ]

  • B. { }

  • C. ( )

  • D. < >

Answer: A. [ ]. Python list literals use square brackets. Braces create a dictionary or set, depending on their contents, while parentheses group expressions or form tuples. View the solved question.

Question 2 (EMRS 2023)

For the following Python statement:

Code
 Txt = list('PEACE')
 print(Txt)
 What shall be the output of print(Txt)?
  • A. ['P', 'E', 'A', 'C', 'E']

  • B. [P, E, A, C, E]

  • C. Error in statement

  • D. ['PEACE']

Answer: A. ['P', 'E', 'A', 'C', 'E']. The constructor reads the string iterable as P, E, A, C, E. When Python prints the list, its representation includes quotes around each string element. By contrast, ['PEACE'] would be a one-element list. View the solved question.

Question 3 (KVS 2026)

Code
What will be the output of the following Python function?
print(len(['PM', 2, False]))
  • A. 3

  • B. 2

  • C. 4

  • D. Error

Answer: A. 3. The top-level elements are the string 'PM', integer 2 and Boolean False. len does not count the two characters inside 'PM' separately, and Python lists can contain mixed types. View the solved question.

Insert at an index and locate a value

For names = ['Aman', 'Rahul', 'Peter'], the indexed row starts as 0:Aman, 1:Rahul, 2:Peter. Applying insert(1, 'John') produces 0:Aman, 1:John, 2:Rahul, 3:Peter. The new item goes before the element previously at index 1. In the other direction, ['A', 'B', 'C'].index('C') returns the zero-based position 2, not the ordinal label 3.

Question 4 (IBPS 2024)

What will be the output of the following Python code?

Code
names = ["Aman", "Rahul", "Peter"]
names.insert(1, "John")
print(names[1])
  • A. Aman

  • B. Rahul

  • C. Peter

  • D. John

  • E. Error

Answer: D. John. After insertion, the complete list is ['Aman', 'John', 'Rahul', 'Peter']. The earlier elements at indices 1 and 2 shift right, so index 1 now holds John. View the solved question.

Question 5 (Bihar STET 2025)

Identify the correct output of the following code snippet:

Code
 game = ["A", "B", "C"]
 print(game.index("C"))
  • A. 0

  • B. 2

  • C. -1

  • D. ValueError

Answer: B. 2. The positions are A -> 0, B -> 1, C -> 2. ValueError is not selected because the searched value is present. View the solved question.

Read negative-step slices and unpack a list

Indexed list trace showing LS[::-2] visits 7, 5, 3, 1 and concatenates two copies.

For LS = [1, 9, 2, 8, 3, 7, 5, 4], label the positions 0 through 7. A negative step reverses direction, then -2 skips every second element. Thus LS[::-2] visits indices 7, 5, 3, 1, which hold 4, 7, 8, 9.

Question 6 (EMRS 2023)

Given the following assignment of a variable:

Code
 LS = [1, 9, 2, 8, 3, 7, 5, 4]
 print(LS[::-2] + LS[::-2])
 What will be the output of the following?
  • A. [5, 3, 2, 1, 9, 8, 7, 4]

  • B. [1, 2, 3, 5, 4, 7, 8, 9]

  • C. [4, 7, 8, 9, 4, 7, 8, 9]

  • D. [9, 8, 7, 4, 5, 3, 2, 1]

Answer: C. [4, 7, 8, 9, 4, 7, 8, 9]. Each slice is [4, 7, 8, 9]. The + operator concatenates the two lists, rather than adding values at matching positions. View the solved question.

Question 7 (KVS 2023)

Code
If a List L= ['Hello', 'World!'] Identify the correct output of the following Python command:
 print(*L)
  • A. Hello World!

  • B. Hello, World!

  • C. 'Hello', 'World!'

  • D. 'Hello' 'World!'

Answer: A. Hello World!. *L supplies two positional arguments to print. Its default separator is one space, and printed strings do not display their quote marks. This attributed MCQ set focuses on direct list operations; Python Output-Based Questions: 13 Solved Snippets instead develops aliasing, copies, slice assignment and mutability through standalone traces. View the solved question.

Separate extend, append, insert, pop and remove

extend([4, 5]) adds two elements to the receiving list, while append([6, 7]) adds one nested-list element. pop(i) removes by index and returns the removed value. remove(x) removes the first matching value. For a chain of mutations, write a fresh list state after every statement.

Question 8 (KVS 2023)

Identify the correct output of the Python code:

Code
 L1=[1,2,3]
 L2=[4,5]
 L3=[6,7]
 L1.extend(L2)
 L1.append(L3)
 print(L1)
  • A. [1, 2, 3, 4, 5, 6, 7]

  • B. [1, 2, 3, [4, 5], 6, 7]

  • C. [1, 2, 3, 4, 5, [6, 7]]

  • D. [1, 2, 3, [4, 5], [6, 7]]

Answer: C. [1, 2, 3, 4, 5, [6, 7]]. After extend, L1 is [1, 2, 3, 4, 5]. append(L3) then adds [6, 7] as one final element. Option A would require extend twice. View the solved question.

Question 9 (EMRS 2026)

Carefully analyze the following Python program segment and determine the correct output:

Code
L = [4, 7, 2, 8, 2, 5]
L.insert(1, 0)
L.pop(2)
L.remove(2)
L.extend([3, 1])
print(L)
  • A. [0, 4, 8, 2, 5, 3, 1]

  • B. [4, 0, 8, 2, 5, [3, 1]]

  • C. [4, 0, 8, 2, 5, [3, 1]]

  • D. [4, 0, 8, 2, 5, 3, 1]

Answer: D. [4, 0, 8, 2, 5, 3, 1]. Trace every mutation:

  1. After insert: [4, 0, 7, 2, 8, 2, 5]

  2. After pop(2): [4, 0, 2, 8, 2, 5]

  3. After remove(2): [4, 0, 8, 2, 5]

  4. After extend: [4, 0, 8, 2, 5, 3, 1]

Options B and C are identical in the source question. View the solved question.

Evaluate nested pop calls and a stack convention

Python evaluates nested calls from the innermost expression outward. Also remember that Python does not choose which end represents a stack's top. The code or question establishes that convention.

Question 10 (EMRS 2026)

Carefully analyze the following Python program segment and determine the correct output:

Code
L = [4, 7, 8, 5, 2]
print(L.pop(L.pop()))
Choose the correct output from the options given below:
  • A. 7

  • B. 8

  • C. [4, 8, 5]

  • D. [4, 7, 5]

Answer: B. 8. Starting from [4, 7, 8, 5, 2], the inner pop() returns 2 and leaves [4, 7, 8, 5]. The outer call therefore becomes pop(2), which returns 8 and leaves [4, 7, 5]. print receives the returned 8, not the final list. View the solved question.

Question 11 (KVS 2023)

The following Python list S is being used as a stack with the top stored at the leftmost position (index 0): S = [10, 12, 0, 4, 6]. If 10 was pushed last, which command should be used to pop the top element from stack S, if it is not empty?

  • A. S.pop(0)

  • B. S.pop()

  • C. S.remove()

  • D. S.remove(0)

Answer: A. S.pop(0). The question fixes the top at index 0, so this call removes and returns 10. S.pop() removes the rightmost 6; S.remove(0) targets the value zero; and remove() without an argument is invalid. View the solved question.

Trace an in-place reverse sort

In-place reverse sort changes PL from ascending Basic, C, C++ to C++, C, Basic.

Compare strings lexicographically. In ascending order, 'Basic', 'C' and 'C++' become ['Basic', 'C', 'C++']. Because 'C' is a prefix of 'C++', the shorter string comes first. Reversing this order gives ['C++', 'C', 'Basic'].

Question 12 (KVS 2023)

If PL is a Python list as follows:

Code
 PL = ['Basic', 'C', 'C++']
 Then what will be the status of the list PL after
 PL.sort(reverse = True) ?
  • A. ['Basic', 'C', 'C++']

  • B. ['C++', 'C', 'Basic']

  • C. ['C', 'C++', 'Basic']

  • D. ['Basic', 'C++', 'C']

Answer: B. ['C++', 'C', 'Basic']. sort(reverse = True) mutates PL in place. Check the stored list itself. The question asks for that final list state. The method's own return value is None, which is a separate fact. View the solved question.

The short version: use a repeatable tracing routine

For every list problem, copy the initial list, label its indices, execute the innermost expression first, and write the complete list after every mutation. For slices, write visited indices before values. For methods, mark whether each call returns a value, changes the list or does both.

Retry Questions 6, 9, 10 and 12 without options. Your checkpoints are [4, 7, 8, 9], four mutation states, inner return 2 before outer pop(2), and ascending order before reversal. Build structured problem solving through DSA Using Python, or browse Coding & Skill Development Courses for the wider programming route.