Skip to content
TestMacher
Chapter 5 · Class 11 Computer Science

Lists — Important Questions

51 questions With answers CBSE format

SUMMARY: This chapter introduces the concept of lists in Python, a fundamental data structure used to store collections of items.
KEY TOPICS: list creation, list indexing, list slicing, list methods, list operations, nested lists, list comprehension, mutable vs immutable types, iterating through lists, applications of lists

Q1 1 Mark

Lists in Python are:

AMutable
BImmutable
CConstants
DHashable only
Check answerHide answer
Correct answer: Option 1 — Mutable
Q2 1 Mark

The output of len([1,2,3,4,5]) is:

A4
B5
C6
DError
Check answerHide answer
Correct answer: Option 2 — 5
Q3 1 Mark

Which method adds an element to the end of a list?

Aadd()
Binsert()
Cappend()
Dextend()
Check answerHide answer
Correct answer: Option 3 — append()
Q4 1 Mark

The output of [1,2,3] + [4,5,6] is:

A[5,7,9]
B[1,2,3,4,5,6]
C[1,2,3]+[4,5,6]
DError
Check answerHide answer
Correct answer: Option 2 — [1,2,3,4,5,6]
Q5 1 Mark

Which of the following removes the last element of a list?

Aremove()
Bpop()
Cdelete()
Dclear()
Check answerHide answer
Correct answer: Option 2 — pop()
Q6 1 Mark

What will be the output of the expression my_list = [1, 2, 3]; my_list[1] = 4; my_list?

A[1, 2, 3]
B[1, 4, 3]
C[4, 2, 3]
D[1, 2, 4]
Check answerHide answer
Correct answer: Option 2 — [1, 4, 3]
Q7 1 Mark

Which of the following methods can be used to insert an element at a specific position in a list?

Aappend()
Binsert()
Cextend()
Dadd()
Check answerHide answer
Correct answer: Option 2 — insert()
Q8 1 Mark

What is the result of the following code: list1 = [1, 2, 3]; list2 = list1 * 2?

A[1, 2, 3, 1, 2, 3]
B[2, 4, 6]
C[1, 2, 3, 2, 4, 6]
D[1, 2, 3, 1, 2]
Check answerHide answer
Correct answer: Option 1 — [1, 2, 3, 1, 2, 3]
Q9 1 Mark

Which of the following statements about list slicing is true?

Alist[0:2] returns the first two elements
Blist[1:3] returns the first three elements
Clist[:3] returns the last three elements
Dlist[3:] returns the first three elements
Check answerHide answer
Correct answer: Option 1 — list[0:2] returns the first two elements
Q10 1 Mark

What will be the output of the following code: my_list = [1, 2, 3]; my_list.append([4, 5])?

A[1, 2, 3, 4, 5]
B[1, 2, 3, [4, 5]]
C[1, 2, 3, 4, 5, 6]
DError: list cannot contain lists
Check answerHide answer
Correct answer: Option 2 — [1, 2, 3, [4, 5]]
Q11 1 Mark

Which of the following operations will result in a TypeError?

A[1, 2, 3] + [4, 5]
B[1, 2, 3] * 2
C[1, 2, 3] - [1]
D[1, 2, 3][1:2]
Check answerHide answer
Correct answer: Option 3 — [1, 2, 3] - [1]
Q12 1 Mark

What does the method pop() do when called on a list without any arguments?

ARemoves the first element
BRemoves the last element
CRemoves a specific element
DClears the entire list
Check answerHide answer
Correct answer: Option 2 — Removes the last element
Q13 1 Mark

Given the list my_list = [1, 2, 3, 4, 5], what will my_list[1:4] return?

A[1, 2, 3]
B[2, 3, 4]
C[3, 4, 5]
D[1, 2, 3, 4]
Check answerHide answer
Correct answer: Option 2 — [2, 3, 4]
Q14 1 Mark

Which of the following is a characteristic of lists in Python?

ALists are immutable
BLists can contain elements of different data types
CLists are fixed in size
DLists cannot contain other lists
Check answerHide answer
Correct answer: Option 2 — Lists can contain elements of different data types
Q15 1 Mark

What will be the output of the following code: nested_list = [[1, 2], [3, 4]]; nested_list[0][1]?

A1
B2
C3
D4
Check answerHide answer
Correct answer: Option 2 — 2
Q16 3 Marks

Differentiate between append() and extend() methods of a list.

Q17 3 Marks

Differentiate between remove() and pop() methods of a list.

Q18 3 Marks

Write Python code to find the maximum element in a list.

Q19 3 Marks

Explain list slicing with an example.

Q20 3 Marks

How can you sort a list in descending order in Python?

Q21 3 Marks

What is a nested list in Python? Provide an example.

View sample solutionHide solution
A nested list is a list that contains other lists as its elements. For example, [[1, 2], [3, 4], [5, 6]] is a nested list where each element is itself a list.
Q22 3 Marks

How do you access the third element of a list named 'my_list'?

View sample solutionHide solution
You can access the third element of 'my_list' using the index 2, like this: my_list[2]. In Python, list indexing starts from 0.
Q23 3 Marks

What is list comprehension in Python? Give an example.

View sample solutionHide solution
List comprehension is a concise way to create lists using a single line of code. For example, [x**2 for x in range(5)] generates a list of squares of numbers from 0 to 4: [0, 1, 4, 9, 16].
Q24 3 Marks

Explain the difference between mutable and immutable types in Python with respect to lists.

View sample solutionHide solution
Mutable types, like lists, can be changed after their creation, allowing for modifications such as adding or removing elements. Immutable types, like tuples, cannot be changed once created, meaning their elements cannot be modified or deleted.
Q25 3 Marks

How can you iterate through a list using a for loop? Provide a code snippet.

View sample solutionHide solution
You can iterate through a list using a for loop by using the syntax: for item in my_list: print(item). This will print each element in 'my_list' sequentially.
Q26 6 Marks

Compare list and tuple in Python with the help of a table on five features.

Q27 6 Marks

Differentiate between append() and extend() methods of a list in tabular form.

Q28 6 Marks

Compare remove() and pop() list methods with the help of a table.

Q29 6 Marks

Write a Python program to find the second largest number in a list.

Q30 6 Marks

Discuss any five built-in list methods in Python with one example each.

Q31 6 Marks

Write a Python program to find the sum of all even numbers in a list using a for loop.

Q32 1 Mark

Assertion (A): Lists are mutable.

Reason (R): Their elements can be changed after the list is created.

Show explanationHide explanation
Correct answer: Option 1 — Both A and R are true, and R is the correct explanation of A.
Q33 1 Mark

Assertion (A): Lists can store elements of different data types.

Reason (R): Python lists are heterogeneous.

Show explanationHide explanation
Correct answer: Option 1 — Both A and R are true, and R is the correct explanation of A.
Q34 1 Mark

Assertion (A): len() can be used to find the size of a list.

Reason (R): It returns the count of elements in the list.

Show explanationHide explanation
Correct answer: Option 1 — Both A and R are true, and R is the correct explanation of A.
Q35 1 Mark

Assertion (A): The append() method modifies the list in place.

Reason (R): It adds the argument as a single element at the end.

Show explanationHide explanation
Correct answer: Option 1 — Both A and R are true, and R is the correct explanation of A.
Q36 1 Mark

Assertion (A): Sorting a list of strings is case-sensitive by default.

Reason (R): Capital letters come before lowercase in ASCII order.

Show explanationHide explanation
Correct answer: Option 1 — Both A and R are true, and R is the correct explanation of A.
Q37 1 Mark

Assertion (A): A list in Python can be created using square brackets.

Reason (R): Lists can also be created using the list() constructor.

Show explanationHide explanation
Correct answer: Option 1 — Both A and R are true, and R is the correct explanation of A.
Q38 1 Mark

Assertion (A): List indexing in Python starts from 1.

Reason (R): Python uses zero-based indexing for lists.

Show explanationHide explanation
Correct answer: Option 4 — A is false, but R is true.
Q39 1 Mark

Assertion (A): List slicing allows you to extract a portion of a list.

Reason (R): Slicing can only be performed on strings, not on lists.

Show explanationHide explanation
Correct answer: Option 3 — A is true, but R is false.
Q40 1 Mark

Statement 1: Lists in Python are ordered collections.

Statement 2: The position of an element is preserved.

Show answerHide answer
Correct answer: Option 1 — Both statements are true.
Q41 1 Mark

Statement 1: Lists support both positive and negative indexing.

Statement 2: Negative indices count from the end.

Show answerHide answer
Correct answer: Option 1 — Both statements are true.
Q42 1 Mark

Statement 1: Lists are created using square brackets.

Statement 2: An empty list is denoted by [].

Show answerHide answer
Correct answer: Option 1 — Both statements are true.
Q43 1 Mark

Statement 1: The 'in' operator checks element membership.

Statement 2: The 'not in' operator checks for absence.

Show answerHide answer
Correct answer: Option 1 — Both statements are true.
Q44 1 Mark

Statement 1: List comprehension is a concise way to create lists.

Statement 2: It uses a for clause inside square brackets.

Show answerHide answer
Correct answer: Option 1 — Both statements are true.
Q45 1 Mark

Statement 1: Lists in Python are immutable data structures.

Statement 2: You can change the elements of a list after it has been created.

Show answerHide answer
Correct answer: Option 2 — Only Statement 1 is true.
Q46 1 Mark

Statement 1: List slicing allows you to extract a portion of a list.

Statement 2: List slicing can only be done using positive indices.

Show answerHide answer
Correct answer: Option 3 — Only Statement 2 is true.
Q47 1 Mark

Statement 1: The append() method adds an element to the end of a list.

Statement 2: The insert() method can add an element at any specified index in a list.

Show answerHide answer
Correct answer: Option 1 — Both statements are true.
Q48 3 Marks
A teacher has a list of marks of 5 students stored as marks = [78 65 92 84 55]. She needs to find the average maximum and minimum marks and identify students who scored above average. She decides to use Python list operations and a for loop.
  1. Which function returns the number of elements in the list?
    Alen(marks)
    Bsize(marks)
    Clength(marks)
    Dcount(marks)
  2. Lists in Python are:
    AMutable
    BImmutable
    CSet
    DTuple
  3. Write a Python program to compute average max min and list students above the average.
Show answersHide answers
1. Option 1 — len(marks)
2. Option 1 — Mutable
3. avg = sum(marks) / len(marks) = 374/5 = 74.8. max(marks) = 92. min(marks) = 55. To find above-average students: above = [m for m in marks if m > avg] which gives [78 92 84]. List comprehensions are concise and Pythonic. Lists support indexing slicing and many built-in functions like sum max min len.
Q49 6 Marks

Predict the output of each list operation.

Operation on a = [1, 2, 3]Result
a.append(4)?
a.extend([5, 6])?
a.insert(0, 0)?
a.remove(3)?
a.pop()?
a.sort(reverse=True)?
Q50 3 Marks

Study the table of list operations and answer:

OperationUseExampleResult
append()Add at end[1,2].append(3)[1,2,3]
extend()Add multiple[1,2].extend([3,4])[1,2,3,4]
insert()Add at position[1,3].insert(1,2)[1,2,3]
remove()Remove value[1,2,3].remove(2)[1,3]
pop()Remove last[1,2,3].pop()[1,2]
  1. Which method adds a single element at the end of the list?
    Aappend()
    Bextend()
    Cadd()
    Dinsert()
  2. Which method adds multiple elements to a list?
    Aappend()
    Bextend()
    Cinsert()
    Djoin()
  3. Discuss any five list methods in Python with examples.
Show answersHide answers
1. Option 1 — append()
2. Option 2 — extend()
3. Lists support append extend insert remove pop sort reverse len etc. append adds one element; extend adds elements of an iterable. insert places at a specific index. remove deletes by value pop deletes by index. sort sorts in place; sorted() returns a new sorted list. List comprehensions like [x*2 for x in lst] are concise.
Q51 3 Marks

Study the list memory layout and operations and answer:

Lists figure
  1. Which method adds a single element at the end of a list?
    Aappend()
    Bextend()
    Cinsert()
    Dpop()
  2. For lst = [10, 20, 99, 40, 50] what is lst[1:4]?
    A[10, 20]
    B[20, 99, 40]
    C[20, 30, 40]
    D[10, 20, 99, 40, 50]
  3. Discuss any five list operations in Python with examples.
Show answersHide answers
1. Option 1 — append()
2. Option 2 — [20, 99, 40]
3. Lists are mutable ordered collections in Python. Indexing (positive and negative) gives single elements; slicing returns sublists. append adds one element at end; extend adds multiple; insert at specific index; pop removes by index; remove by value. Lists are heterogeneous and can contain mixed types.

Make a full Computer Science paper on Lists.

Pick the question mix, set the marks, hit generate. You get a ready-to-print paper with an answer key.

Generate your paper — free