資料型別¶
本章節所描述的模組 (module) 提供了多樣的專門資料型別,例如日期與時間、固定型別陣列 (fixed-type arrays)、堆積佇列 (heap queues)、雙端佇列 (double-ended queues) 與列舉 (enumerations)。
Python 也有提供一些內建資料型別,特別是 dict、list、set 與 frozenset 和 tuple。str 類別是用來儲存 Unicode 字串,bytes 與 bytearray 類別則是用來儲存二進位制資料。
本章節包含下列模組的文件:
datetime--- 日期與時間的基本型別zoneinfo--- IANA 時區支援calendar--- General calendar-related functionscollections--- 容器資料型態collections.abc--- Abstract Base Classes for Containersheapq--- 堆積佇列 (heap queue) 演算法bisect--- 陣列二分演算法 (Array bisection algorithm)array--- 高效率的數值型陣列weakref--- Weak referencestypes--- Dynamic type creation and names for built-in typescopy--- 淺層 (shallow) 和深層 (deep) 複製操作pprint--- Data pretty printerreprlib--- Alternaterepr()implementationenum--- Support for enumerationsgraphlib—-- 使用類圖 (graph-like) 結構進行操作的功能