資料型別¶
本章節所描述的模組 (module) 提供了多樣的專門資料型別,例如日期與時間、固定型別陣列 (fixed-type arrays)、堆積佇列 (heap queues)、雙端佇列 (double-ended queues) 與列舉 (enumerations)。
Python also provides some built-in data types, in particular,
list, tuple, dict, frozendict,
set, and frozenset.
The str class is used to hold
Unicode strings, and the bytes and bytearray classes are used
to hold binary data.
本章節包含下列模組的文件:
datetime--- 日期與時間的基本型別zoneinfo--- IANA 時區支援calendar--- 日曆相關函式collections--- 容器資料型別collections.abc--- 容器的抽象基底類別heapq--- 堆積佇列 (heap queue) 演算法bisect--- 陣列二分演算法 (Array bisection algorithm)array--- 高效率的數值型陣列weakref--- 弱參照types--- 動態型別建立與內建型別名稱copy--- 淺層 (shallow) 和深層 (deep) 複製操作pprint--- 資料美化列印器reprlib---repr()的替代實作enum--- 對列舉的支援graphlib—-- 使用類圖 (graph-like) 結構進行操作的功能