MindMap Gallery python data structure
This picture is about the relevant definitions of the basic data structures of list (list), tuple (tuple), str (string), dict (dictionary), and set (set) in python, as well as common operation knowledge.
Edited at 2023-08-19 19:25:44This Valentine's Day brand marketing handbook provides businesses with five practical models, covering everything from creating offline experiences to driving online engagement. Whether you're a shopping mall, restaurant, or online brand, you'll find a suitable strategy: each model includes clear objectives and industry-specific guidelines, helping brands transform traffic into real sales and lasting emotional connections during this romantic season.
This Valentine's Day map illustrates love through 30 romantic possibilities, from the vintage charm of "handwritten love letters" to the urban landscape of "rooftop sunsets," from the tactile experience of a "pottery workshop" to the leisurely moments of "wine tasting at a vineyard"—offering a unique sense of occasion for every couple. Whether it's cozy, experiential, or luxurious, love always finds the most fitting expression. May you all find the perfect atmosphere for your love story.
The ice hockey schedule for the Milano Cortina 2026 Winter Olympics, featuring preliminary rounds, quarterfinals, and medal matches for both men's and women's tournaments from February 5–22. All game times are listed in Eastern Standard Time (EST).
This Valentine's Day brand marketing handbook provides businesses with five practical models, covering everything from creating offline experiences to driving online engagement. Whether you're a shopping mall, restaurant, or online brand, you'll find a suitable strategy: each model includes clear objectives and industry-specific guidelines, helping brands transform traffic into real sales and lasting emotional connections during this romantic season.
This Valentine's Day map illustrates love through 30 romantic possibilities, from the vintage charm of "handwritten love letters" to the urban landscape of "rooftop sunsets," from the tactile experience of a "pottery workshop" to the leisurely moments of "wine tasting at a vineyard"—offering a unique sense of occasion for every couple. Whether it's cozy, experiential, or luxurious, love always finds the most fitting expression. May you all find the perfect atmosphere for your love story.
The ice hockey schedule for the Milano Cortina 2026 Winter Olympics, featuring preliminary rounds, quarterfinals, and medal matches for both men's and women's tournaments from February 5–22. All game times are listed in Eastern Standard Time (EST).
python data structure
list(list)
Definition: A data container that is ordered, repeatable, modifiable, and can accommodate multiple different data types
Definition of empty list
variable name = []
variable name = list()
List search: index (list element)
Remove elements from the list: list[subscript]
Modify elements in the list: list[subscript]=value
Insert element: list.insert(subscript, element)
Append elements:
list.append(element)
list.extend(other data containers)
Delete elements:
del list[subscript]
list.pop(subscript)
clear the list
list.clear()
Count the number of an element in the list: list.count(element)
Count how many elements there are in the list: len(list)
tuple(tuple)
Definition: An ordered, repeatable, multiple data type, unmodifiable data container that remains unchanged once defined
Definition of empty tuple
variable name = ()
variable name = tuple()
Find elements in a tuple: index(element)
Count the number of elements in a tuple: tuple.count(element)
Count the number of elements in a tuple: len(tuple)
str(string)
Definition: Supports subscript index and cannot be modified, but the corresponding position can be replaced according to the subscript. After the replacement, a new string is obtained instead of a modification of the string.
Replacement of string: str.replace(string1, string2) Replace string1 with string2
String splitting: str.split (the splitting standard for splitting, the default is to split according to spaces)
String shaping operation: str.strip() removes the leading and trailing spaces and newline characters from the string
dict(dictionary)
Definition: Store key-value pairs. Each key-value pair is separated by commas. Key and value can be any type of data (key cannot be a dictionary). Key cannot be repeated. Repeating will overwrite the original data.
Define empty dictionary
variable name = {}
variable name = dict()
Dictionary acquisition: dict["key"] Dictionaries cannot use subscript indexes
Add new element (update element): dict[key]=value
Delete elements: dict.pop(key)
Clear the dictionary: dict.clear()
Get all keys in the dictionary: dict.keys()
set(set)
Definition: Unordered, non-repeating, modifiable, data container that supports multiple data types. Because it is unordered, it does not support subscript index access to elements in the collection.
Add elements: set.add(element)
Remove elements: set.remove(element)
Randomly remove elements: set.pop()
Clear the collection: set.clean()
Take the difference between two sets: set 1.difference(set 2) to get a new set, set 1 and set 2 remain unchanged
Eliminate difference sets: Set 1.difference_update (set 2) In set 1, delete the same elements as set 2. Set 1 will be modified, and set 2 will remain unchanged.
Define an empty collection: variable name = set()