Python Lists MCQs | 25 Practice Questions with Answers | CBSE Class 11 Computer Science
Class 11 · Computer Science
Python Lists MCQs (25 Questions)
Practice these multiple-choice questions to strengthen your understanding of Python Lists. Click Show Answer to reveal the correct answer and explanation.
Q1. Which symbol is used to create a list in Python?
A. ( )
B. { }
C. [ ]
D. < >
Show Answer
Answer: C. [ ]
Explanation: A list is created using square brackets [ ].
Q2. Which of the following is a valid Python list?
A. (10,20,30)
B. {10,20,30}
C. [10,20,30]
D. <10,20,30>
Show Answer
Answer: C. [10,20,30]
Explanation: Lists are represented using square brackets.
Q3. Which statement about Python lists is correct?
A. Lists are immutable.
B. Lists are mutable.
C. Lists cannot contain duplicate values.
D. Lists store only integers.
Show Answer
Answer: B. Lists are mutable.
Explanation: List elements can be modified after creation.
Q4. What is the index of the first element in a list?
A. 1
B. -1
C. 0
D. Depends on the list
Show Answer
Answer: C. 0
Explanation: Python follows zero-based indexing.
Q5. What is the output of the following code?
numbers=[10,20,30]
print(numbers[1])
A. 10
B. 20
C. 30
D. Error
Show Answer
Answer: B. 20
Explanation: Index 1 refers to the second element of the list.
Q6. Which operator is used to concatenate two lists?
A. *
B. +
C. /
D. %
Show Answer
Answer: B. +
Explanation: The + operator joins two lists.
Q7. Which operator is used to repeat a list?
A. +
B. *
C. %
D. //
Show Answer
Answer: B. *
Explanation: The * operator repeats the elements of a list.
Q8. Which operator checks whether an element exists in a list?
A. in
B. is
C. ==
D. &
Show Answer
Answer: A. in
Explanation: The in operator checks membership in a list.
Q9. Which slicing expression returns the first three elements of a list named numbers?
A. numbers[1:3]
B. numbers[:3]
C. numbers[3:]
D. numbers[-3:]
Show Answer
Answer: B. numbers[:3]
Explanation: The stop index is excluded, so indices 0, 1, and 2 are returned.
Q10. Which loop is most commonly used to traverse all elements of a list?
A. switch
B. do-while
C. for loop
D. goto
Show Answer
Answer: C. for loop
Explanation: The for loop is commonly used to traverse list elements.
Q11. Which function returns the total number of elements in a list?
A. size()
B. length()
C. len()
D. count()
Show Answer
Answer: C. len()
Explanation: The len() function returns the number of elements present in a list.
Q12. Which method adds a single element at the end of a list?
A. insert()
B. append()
C. extend()
D. add()
Show Answer
Answer: B. append()
Explanation: The append() method adds one element to the end of the list.
Q13. Which method is used to add all elements of another list to an existing list?
A. append()
B. insert()
C. extend()
D. add()
Show Answer
Answer: C. extend()
Explanation: The extend() method adds all elements of another iterable to the list.
Q14. Which method inserts an element at a specified position in a list?
A. append()
B. insert()
C. extend()
D. add()
Show Answer
Answer: B. insert()
Explanation: The insert() method inserts an element at the specified index.
Q15. Which method returns the number of occurrences of an element in a list?
A. count()
B. index()
C. find()
D. len()
Show Answer
Answer: A. count()
Explanation: The count() method returns how many times an element appears in the list.
Q16. Which method returns the index of the first occurrence of an element?
A. find()
B. search()
C. index()
D. locate()
Show Answer
Answer: C. index()
Explanation: The index() method returns the index of the first matching element.
Q17. Which method removes the first occurrence of a specified element from a list?
A. pop()
B. delete()
C. remove()
D. clear()
Show Answer
Answer: C. remove()
Explanation: The remove() method removes the first matching element from the list.
Q18. Which method removes and returns the last element of a list by default?
A. remove()
B. delete()
C. pop()
D. clear()
Show Answer
Answer: C. pop()
Explanation: Without an index, pop() removes and returns the last element of the list.
Q19. Which method reverses the order of elements in a list?
A. reverse()
B. sort()
C. reversed()
D. rotate()
Show Answer
Answer: A. reverse()
Explanation: The reverse() method reverses the elements of the original list.
Q20. Which method sorts the original list in ascending order?
A. sorted()
B. arrange()
C. sort()
D. order()
Show Answer
Answer: C. sort()
Explanation: The sort() method sorts the original list in ascending order by default.
Q21. Which function returns a new sorted list without modifying the original list?
A. sort()
B. reverse()
C. sorted()
D. arrange()
Show Answer
Answer: C. sorted()
Explanation: The sorted() function returns a new sorted list, whereas sort() modifies the original list.
Q22. Which function returns the largest element in a numeric list?
A. largest()
B. max()
C. high()
D. top()
Show Answer
Answer: B. max()
Explanation: The max() function returns the largest element in a list.
Q23. Which function returns the smallest element in a numeric list?
A. minimum()
B. low()
C. min()
D. smallest()
Show Answer
Answer: C. min()
Explanation: The min() function returns the smallest element in a list.
Q24. Which function returns the sum of all numeric elements in a list?
A. total()
B. sum()
C. add()
D. count()
Show Answer
Answer: B. sum()
Explanation: The sum() function calculates the total of all numeric elements in a list.
Q25. What is a nested list?
A. A list containing only numbers.
B. A list containing another list as an element.
C. A list containing only strings.
D. A list with duplicate values only.
Show Answer
Answer: B. A list containing another list as an element.
Explanation: A nested list is a list whose elements may themselves be lists, allowing two-dimensional or hierarchical data storage.
Answer Key
| Q.No. | Answer | Q.No. | Answer | Q.No. | Answer |
|---|---|---|---|---|---|
| 1 | C | 10 | C | 19 | A |
| 2 | C | 11 | C | 20 | C |
| 3 | B | 12 | B | 21 | C |
| 4 | C | 13 | C | 22 | B |
| 5 | B | 14 | B | 23 | C |
| 6 | B | 15 | A | 24 | B |
| 7 | B | 16 | C | 25 | B |
| 8 | A | 17 | C | ||
| 9 | B | 18 | C |
Practice Tips
- Understand the difference between
append()andextend(). - Remember that
sort()modifies the original list, whereassorted()returns a new sorted list. - Practice list indexing and slicing carefully.
- Know the difference between
remove()(removes by value) andpop()(removes by index). - Revise commonly used list functions such as
len(),min(),max(), andsum(). - Solve the questions once without viewing the answers, then use the explanations to identify and improve weak areas.