7. Data Types
The modules described in this chapter provide a variety of specialized data types such as dates and times, fixed-type arrays, heap queues, synchronized queues, and sets.
Python also provides some built-in data types, in particular, dict, list, set and frozenset, and tuple. The str class is used to hold Unicode strings, and the bytes class is used to hold binary data.
The following modules are documented in this chapter:
- 7.1. datetime — Basic date and time types
- 7.2. calendar — General calendar-related functions
- 7.3. collections — Container datatypes
- 7.4. heapq — Heap queue algorithm
- 7.5. bisect — Array bisection algorithm
- 7.6. array — Efficient arrays of numeric values
- 7.7. sched — Event scheduler
- 7.8. queue — A synchronized queue class
- 7.9. weakref — Weak references
- 7.10. types — Names for built-in types
- 7.11. copy — Shallow and deep copy operations
- 7.12. pprint — Data pretty printer
- 7.13. reprlib — Alternate repr() implementation