os 与 sys
掌握 os 与 sys 模块,进行环境变量、目录、进程、平台判断等系统级操作,并对比 os.path 与 pathlib、os.system 与 subprocess。
datetime
掌握 datetime、date、time、timedelta、时区 aware 与 naive、zoneinfo、时间戳、日期运算与 calendar 模块。
collections
掌握 namedtuple、deque、ChainMap、Counter、OrderedDict、defaultdict 及 UserDict/UserList/UserString,写出更简洁高效的容器代码。
itertools
掌握 chain、product、combinations、permutations、accumulate、groupby、islice、starmap、zip_longest 与无限迭代器,写出高效的迭代代码。
pathlib
掌握 PurePath 与 Path、路径拼接与属性、读写文件、glob/rglob 查找、目录遍历与 Python 3.12 的 walk 方法。
functools
掌握 @cache、@lru_cache、@cached_property、partial、reduce、singledispatch、wraps、total_ordering 与 cmp_to_key,写出高效且可复用的函数代码。