-
Data Structure in PythonDynamicPL/Python 2019. 10. 18. 14:54
1. Overview
There are quite a few data structures available. The builtins data structures are lists, tuples, dictionaries, strings, sets, and frozensets.
Lists, strings, and tuples are ordered sequences of objects. Unlike strings that contain only characters, list and tuples can contain any type of objects. Lists and tuples are like arrays. Tuples like strings are immutables. Lists are mutables so they can be extended or reduced at will. Sets are mutable unordered sequence of unique elements whereas frozensets are immutable sets.
2. Description
2.1 List
2.1.1 Features
- Ordered
- Index
- Mutable
- duplicatable
- iterable
- sliceable
- sequence
2.2 Tuple
2.2.1 Features
- Ordered
- Index
- Immutable
- duplicatable
- iterable
- sequence
- sliceable
2.3 Set
2.3.1 Features
- unordered
- mutable
- iterable
- no duplicate
2.4 Dictionary
- unordered
- pairs of key and value
- iterable
2.5 String
- immutable
3. Reference
https://www.datacamp.com/community/tutorials/data-structures-python
'DynamicPL > Python' 카테고리의 다른 글
Slice (0) 2019.10.28 Sequence (0) 2019.10.26 List, Dictionary, Set Comprehensions, and Difference between List Comprehensions and Generator expressions (0) 2019.10.22 iterator, iterable, iteration, iterator protocol, generator functions, generator expressions, and lazy evaluation (0) 2019.10.22 Asterisk(*) of Python (0) 2019.10.18