1/16
These flashcards cover key vocabulary and concepts related to tuples, lists, and dictionaries in Python.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Tuple
An immutable sequence of values that can mix data types and may contain nested tuples.
List
A mutable sequence of values that can mix data types and may contain nested lists.
Dictionary
A mapping between keys and values, where items are stored as key-value pairs.
Immutable
A property of tuples meaning that once created, their elements cannot be changed.
Indexing
Accessing elements of sequences (like tuples and lists) using their position.
Slicing
Creating a new tuple or list by extracting a portion of it without changing the original.
Concatenation
Combining two tuples or lists into a new tuple or list using the + operator.
Membership Test
Using the 'in' keyword to check if an item exists in a tuple, list, or dictionary.
Zip Function
A built-in function that combines two or more sequences into a list of tuples.
Insert Method
A list method that adds an element at a specified position.
Append Method
A list method that adds an element to the end of a list.
Extend Method
A list method that adds elements from another list to the end of the existing list.
Join Method
Concatenates a sequence of strings into a single string with a specified separator.
Split Method
Divides a string into a list based on a specified delimiter.
Keys Method
Returns a list of the keys in a dictionary.
Values Method
Returns a list of the values in a dictionary.
Items Method
Returns a list of the key-value pairs in a dictionary as tuples.