1/20
Flashcards to assist in understanding key vocabulary and concepts related to List Data Structures as taught in the AI Vietnam course.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Container
Objects that hold multiple values; help in storing, organizing, and accessing data efficiently.
List
An ordered, mutable collection that can contain duplicate values and allows indexing.
Ordered
Items in a List that maintain their arrangement based on their insertion order.
Mutable
The capability of a List to be modified after its creation.
Indexable
The ability to access elements in a List via their positions.
Heterogeneous
Describes a List that can contain items of multiple different types.
Iterable
An object that can be iterated over, such as a List.
List comprehension
A concise way to create Lists by transforming one iterable into another.
Slicing
The process of extracting a portion of a sequence from a List.
.append()
List method that adds a single element at the end.
.insert()
List method that adds an element at a specified index.
.remove()
List method that removes the first occurrence of specified value.
.pop()
List method that removes an element at a given index and returns it.
.clear()
List method that removes all items from the list.
2D List
A List of Lists, which allows for a matrix-like data structure.
Indexing
Accessing an element based on its position in a List.
Zero-based indexing
Indexing method where the first element is at index 0.
Row
A horizontal grouping of items in a 2D List.
Column
A vertical grouping of items in a 2D List.
List[start : stop : step]
Syntax to slice a List from start to stop with a specified step.
List comprehension for 2D list
A method to create a 2D List using nested for loops in a compact way.