Reinforce your Python list knowledge with structured review questions. Cover key concepts like list creation, indexing, slicing, and manipulation with clear, beginner-friendly Q&A.
A list is an ordered, mutable collection of elements enclosed in square brackets []. Lists are created by placing comma-separated values between square brackets or using the list() constructor.
📘 Related Topics:
Python lists use zero-based indexing where the first element is at index 0. Negative indices count backward from the end (-1 is last element).
📘 Related Topics:
Slicing extracts a portion of a list using the syntax list[start:stop:step]. Start is inclusive, stop is exclusive, and step determines the interval.
📘 Related Topics:
- append(): Adds a single element to the end - extend(): Adds all elements from an iterable to the end - insert(): Adds an element at a specific position
📘 Related Topics:
Common removal methods: - remove(): Removes first matching value - pop(): Removes item at given index (default last) - del: Deletes item(s) by index/slice - clear(): Empties entire list
📘 Related Topics: