- Mastering Python
- Rick van Hattem
- 159字
- 2021-07-16 11:10:33
Chapter 3. Containers and Collections – Storing Data the Right Way
Python comes bundled with several very useful collections, a few of which are basic Python collection data types. The rest are advanced combinations of these types. In this chapter, we will explain some of these collections, how to use them, and the pros and cons of each of them.
Before we can properly discuss data structures and the related performance, a basic understanding of time complexity (and specifically the big O notation) is required. No need to worry! The concept is really simple, but without it, we cannot easily explain the performance characteristics of operations.
Once the big O notation is clear, we will discuss the basic data structures:
list
dict
set
tuple
Building on the basic data structures, we will continue with more advanced collections, such as the following:
- Dictionary-like types:
ChainMap
Counter
Defaultdict
OrderedDict
- List types:
Deque
Heapq
- Tuple types:
NamedTuple
- Other types:
Enum
- ThinkPHP 5實戰
- Python 深度學習
- 算法大爆炸:面試通關步步為營
- Visual Basic程序設計教程
- C語言程序設計實踐教程
- Python編程從0到1(視頻教學版)
- Building Android UIs with Custom Views
- Scala Reactive Programming
- Go語言開發實戰(慕課版)
- iOS開發項目化入門教程
- Java 9 with JShell
- Google Adsense優化實戰
- Arduino Electronics Blueprints
- Effective C++:改善程序與設計的55個具體做法(第三版)中文版(雙色)
- Developer,Advocate!