Please enable JavaScript.
Coggle requires JavaScript to display documents.
Sets and Dictionaries, Hashing - Coggle Diagram
Sets and Dictionaries
Sets
-
Using set() function: set([1, 2, 3])
Using curly braces: {1, 2, 3}
-
-
-
Dictionaries
-
Creation
Using curly braces: {'key1': 'value1', 'key2': 'value2'}
Using dict() function: dict(key1='value1', key2='value2')
Key Properties
-
Keys must be immutable (e.g., strings, numbers, tuples)
-
-
Hashing
-
Process of converting an input (or 'key') into a fixed-size string of bytes
Typically uses a hash function
Data structure that implements an associative array abstract data type
Maps keys to values using a hash function