Test your knowledge of Python lists with true or false practice questions. Strengthen your understanding of list operations, indexing, slicing, and common methods with instant feedback.
✅ True – Python lists are heterogeneous and can contain any mix of data types (e.g., [1, 'a', True, 3.14]).
❌ False – Negative indices count from the end, so -1 refers to the last element, -2 refers to the second last, etc.
❌ False – Slicing is inclusive of the start index and exclusive of the end index, so it includes indices 1 and 2 but not 3.
❌ False – append() adds a single element to the end of the list. To add multiple elements, use extend() or += operator.
❌ False – Lists are mutable - their elements can be changed after creation, unlike tuples which are immutable.
✅ True – When a string is passed to list(), it creates a list where each character becomes a separate element: ['h', 'e', 'l', 'l', 'o'].
✅ True – Using [:] without start or end indices creates a new list with all elements copied from the original.
✅ True – sort() sorts the list in place and returns None, unlike sorted() which returns a new sorted list.
✅ True – insert(index, element) allows you to add an element at any valid index, including at the beginning or end.
❌ False – The step value of 2 returns every second element (elements at even indices), not every third element.
❌ False – remove() only removes the first occurrence of the specified value. To remove all occurrences, you need to use a loop or list comprehension.
❌ False – clear() modifies the existing list object, while assigning [] creates a new list object. This affects other references to the list.