Chapter 9 · Class 11 · CBSE · Science Computer Science
Lists
25 practice questions · 5 marks weightage
Topics in this chapter
- List Creation, Indexing and Basic Operations
- List Slicing, Operators and Assignment
- List Mutability and Built-in Methods
- Aliasing, References and Nested Lists
- List Comprehensions and Filtering
Cheat sheet
Cheat SheetPractice questions
- Question 1Q-EB49C1See the answer and solution
What is the value of nums after executing nums = [2, 4, 6]; nums.insert(1, 3)?
- A.[2, 4, 3, 6]
- B.[2, 3, 4, 6]
- C.[3, 2, 4, 6]
- D.[2, 4, 6, 3]
- Question 2Q-16891DSee the answer and solution
Explain the difference between append() and extend() in Python lists, using the following statements: x = [1, 2]; x.append([3, 4]) and y = [1, 2]; y.extend([3, 4]).
- Question 3Q-F66236See the answer and solution
What is printed by the following Python code? a = [10, 20, 30]; b = a; c = a[:]; b[1] = 99; c.append(40); print(a, c)
- A.[10, 99, 30] [10, 20, 30, 40]
- B.[10, 20, 30] [10, 20, 30, 40]
- C.[10, 99, 30, 40] [10, 20, 30]
- D.[10, 99, 30] [10, 99, 30, 40]
- Question 4Q-CB01B3See the answer and solution
What is printed by the following Python code? values = [5, 10, 15, 20, 25]; print(values[1:4])
- A.[5, 10, 15]
- B.[10, 15, 20]
- C.[10, 15, 20, 25]
- D.[15, 20]
- Question 5Q-6B19A5See the answer and solution
What is the output of the following Python code? numbers = [3, 1, 2]; result = numbers.sort(); print(result, numbers)
- A.None [1, 2, 3]
- B.[1, 2, 3] None
- C.[3, 1, 2] None
- D.None [3, 1, 2]
20 more questions on Lists
Sign up free to practise the full chapter. Questions you get wrong come back until you've mastered them.
Start practising freeFree to start · No credit card needed