Mindmap
Data Structures
Inhalt der Mindmap
Data Structures
They are all used to store multiple items in a single variable.
- They take all data types.
LIsts
- Square brackets
- Ordered and changeable. Items can be indexed and moved around.
- Data type, "list"
- Ordered and changeable. Items can be indexed and moved around.
- pets = ["dog", "cat", "tarantula", "fish"]
- Square brackets
Tuples
- fruit = ("apple", "banana", "tomato")
- Round parens
- Ordered.
- Unchangeable.
- Allow duplicates
- Unchangeable.
- Ordered.
Sets
- Unordered and unindexed. You cannot know what item will be returned.
- Unchangeable, but can add new items.
- No duplicates.
- Unchangeable, but can add new items.
- Curly brackets.
- soda = {"Cola", "Pop", "Soda", "Seltzer"}
- Unordered and unindexed. You cannot know what item will be returned.
Dictionaries
- Contain k:v pairs
- Also curly brackets...
- Unordered, unchangeable, no duplicates.
- Also curly brackets...
- Contain k:v pairs
Informationen
- Beschreibung
- Mindmap am Data Structures, erstellt von Austin Ross am 04/02/2021.
- Erstellt von
- Austin Ross
- Aufrufe
- 0
- Bewertung