<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.zhuzhugst.com/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://www.zhuzhugst.com/feed.php">
        <title>张叶安的博客 - python</title>
        <description></description>
        <link>https://www.zhuzhugst.com/</link>
        <image rdf:resource="https://www.zhuzhugst.com/lib/exe/fetch.php?media=logo.png" />
       <dc:date>2026-04-23T04:16:25+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter01&amp;rev=1775649880&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter02&amp;rev=1775715850&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter03&amp;rev=1775715876&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter04&amp;rev=1775715896&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter05&amp;rev=1775715917&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter06&amp;rev=1775715946&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter07&amp;rev=1775715973&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter08&amp;rev=1775715995&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter09&amp;rev=1775716016&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter10&amp;rev=1775716036&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter11&amp;rev=1775716057&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter12&amp;rev=1775716079&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter13&amp;rev=1775716100&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter14&amp;rev=1775716172&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter15&amp;rev=1775716191&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter16&amp;rev=1775716210&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter17&amp;rev=1775716257&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter18&amp;rev=1775716281&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter19&amp;rev=1775716306&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter20&amp;rev=1775716350&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter21&amp;rev=1775716375&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter22&amp;rev=1775716397&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter23&amp;rev=1775716420&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter24&amp;rev=1775716458&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter25&amp;rev=1775716493&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter26&amp;rev=1775716516&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter27&amp;rev=1775716535&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter28&amp;rev=1775716703&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter29&amp;rev=1775716721&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter30&amp;rev=1775716741&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter31&amp;rev=1775716761&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter32&amp;rev=1775716853&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter33&amp;rev=1775716874&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter34&amp;rev=1775716892&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter35&amp;rev=1775716910&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter36&amp;rev=1775716929&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter37&amp;rev=1775716947&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter38&amp;rev=1775716965&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter39&amp;rev=1775716988&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter40&amp;rev=1775717006&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter41&amp;rev=1775717025&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter42&amp;rev=1775717045&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter43&amp;rev=1775717063&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:chapter44&amp;rev=1775717085&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:nuitka&amp;rev=1767754235&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:pandas&amp;rev=1767751811&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.zhuzhugst.com/doku.php?id=python:pyinstall&amp;rev=1767754812&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://www.zhuzhugst.com/lib/exe/fetch.php?media=logo.png">
        <title>张叶安的博客</title>
        <link>https://www.zhuzhugst.com/</link>
        <url>https://www.zhuzhugst.com/lib/exe/fetch.php?media=logo.png</url>
    </image>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter01&amp;rev=1775649880&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-08T12:04:40+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter01</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter01&amp;rev=1775649880&amp;do=diff</link>
        <description>第一章：环境搭建与Hello World

本章目标

完成本章学习后，你将能够：

	*  理解Python的工作原理（解释器、字节码、虚拟机）
	*  在Windows、macOS、Linux上安装Python
	*  配置Python开发环境
	*  编写并运行你的第一个Python程序</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter02&amp;rev=1775715850&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:24:10+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter02</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter02&amp;rev=1775715850&amp;do=diff</link>
        <description>第二章：变量与数据类型

本章目标

完成本章学习后，你将能够：

	*  理解变量的本质和Python的变量模型
	*  掌握Python的所有基本数据类型
	*  理解可变对象与不可变对象的区别
	*  掌握类型转换和类型检查</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter03&amp;rev=1775715876&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:24:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter03</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter03&amp;rev=1775715876&amp;do=diff</link>
        <description>第三章：运算符与表达式

本章目标

完成本章学习后，你将能够：

	*  掌握Python所有类型的运算符
	*  理解运算符优先级和结合性
	*  熟练使用各种表达式
	*  掌握海象运算符等Python 3.8+新特性</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter04&amp;rev=1775715896&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:24:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter04</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter04&amp;rev=1775715896&amp;do=diff</link>
        <description>第四章：条件语句

本章目标

完成本章学习后，你将能够：

	*  熟练使用if、elif、else进行条件判断
	*  理解Python的真值判断机制
	*  掌握match-case模式匹配（Python 3.10+）
	*  编写清晰、高效的判断逻辑</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter05&amp;rev=1775715917&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:25:17+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter05</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter05&amp;rev=1775715917&amp;do=diff</link>
        <description>第五章：循环语句

本章目标

完成本章学习后，你将能够：

	*  熟练使用for和while循环
	*  掌握range()、enumerate()、zip()等迭代工具
	*  理解迭代器协议
	*  掌握循环控制语句break、continue、else
	*</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter06&amp;rev=1775715946&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:25:46+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter06</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter06&amp;rev=1775715946&amp;do=diff</link>
        <description>第六章：推导式与生成器表达式

本章目标

完成本章学习后，你将能够：

	*  熟练使用列表推导式、字典推导式、集合推导式
	*  理解生成器表达式的原理和用法
	*  掌握嵌套推导式
	*  理解推导式与循环的性能差异</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter07&amp;rev=1775715973&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:26:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter07</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter07&amp;rev=1775715973&amp;do=diff</link>
        <description>第七章：字符串深度解析

本章目标

完成本章学习后，你将能够：

	*  理解Python字符串的不可变性和Unicode编码
	*  掌握所有常用字符串方法
	*  熟练使用字符串格式化（%, format, f-string）
	*  理解正则表达式基础</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter08&amp;rev=1775715995&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:26:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter08</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter08&amp;rev=1775715995&amp;do=diff</link>
        <description>第八章：列表与元组

本章目标

完成本章学习后，你将能够：

	*  掌握列表和元组的所有操作
	*  理解可变与不可变的本质区别
	*  熟练使用列表推导式
	*  掌握切片的高级用法
	*  选择合适的数据结构</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter09&amp;rev=1775716016&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:26:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter09</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter09&amp;rev=1775716016&amp;do=diff</link>
        <description>第九章：字典与集合

本章目标

完成本章学习后，你将能够：

	*  掌握字典的所有操作和方法
	*  理解字典的哈希表实现原理
	*  熟练使用集合操作
	*  掌握字典和集合推导式
	*  选择合适的数据结构解决问题</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter10&amp;rev=1775716036&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:27:16+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter10</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter10&amp;rev=1775716036&amp;do=diff</link>
        <description>第十章：高级数据结构

本章目标

完成本章学习后，你将能够：

	*  掌握collections模块的高级数据结构
	*  理解栈、队列、双端队列的应用
	*  使用堆和优先队列
	*  掌握链表的实现和应用

collections模块</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter11&amp;rev=1775716057&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:27:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter11</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter11&amp;rev=1775716057&amp;do=diff</link>
        <description>第十一章：函数基础

本章目标

完成本章学习后，你将能够：

	*  定义和调用函数
	*  掌握各种参数传递方式
	*  理解作用域和LEGB规则
	*  使用递归解决问题
	*  编写文档字符串

函数定义与调用</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter12&amp;rev=1775716079&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:27:59+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter12</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter12&amp;rev=1775716079&amp;do=diff</link>
        <description>第十二章：函数高级特性

本章目标

完成本章学习后，你将能够：

	*  理解闭包和装饰器
	*  掌握函数柯里化和偏函数
	*  使用 functools 模块的工具
	*  理解生成器函数
	*  掌握上下文管理器

闭包（Closure）</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter13&amp;rev=1775716100&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:28:20+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter13</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter13&amp;rev=1775716100&amp;do=diff</link>
        <description>第十三章：面向对象编程基础

本章目标

完成本章学习后，你将能够：

	*  理解面向对象编程的核心概念
	*  定义类和创建对象
	*  使用属性和方法
	*  理解self和init
	*  掌握类变量和实例变量</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter14&amp;rev=1775716172&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:29:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter14</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter14&amp;rev=1775716172&amp;do=diff</link>
        <description>第十四章：继承与多态

本章目标

完成本章学习后，你将能够：

	*  理解继承的概念和用途
	*  实现单继承和多继承
	*  使用方法重写和super()
	*  理解多态和鸭子类型
	*  掌握抽象基类

继承基础</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter15&amp;rev=1775716191&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:29:51+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter15</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter15&amp;rev=1775716191&amp;do=diff</link>
        <description>第十五章：魔术方法与属性

本章目标

完成本章学习后，你将能够：

	*  掌握常用的魔术方法
	*  理解属性装饰器
	*  实现描述符
	*  定制类的行为

常用魔术方法

字符串表示


class Point:
    def __init__(self, x, y):
        self.x = x
        self.y = y
    
    def __str__(self):
        &quot;&quot;&quot;面向用户的字符串&quot;&quot;&quot;
        return f&quot;Point({self.x}, {self.y})&quot;
    
    def __repr__(self):
        &quot;&quot;&quot;面向开发者的字符串，应该能重建对象&quot;&quot;&quot;
        return f&quot;Point({self.x!r}, {self.y!r})&quot;
    
    def __format__(self, format_spec):
        &quot;&quot;&quot;格式化&quot;&quot;&quot;
        if format_spec == &quot;polar&quot;:
            r = (se…</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter16&amp;rev=1775716210&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:30:10+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter16</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter16&amp;rev=1775716210&amp;do=diff</link>
        <description>第十六章：元类

本章目标

完成本章学习后，你将能够：

	*  理解元类的概念
	*  创建自定义元类
	*  使用元类实现ORM和单例模式
	*  理解类的创建过程

什么是元类

元类（Metaclass）是“类的类</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter17&amp;rev=1775716257&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:30:57+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter17</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter17&amp;rev=1775716257&amp;do=diff</link>
        <description>第十七章：设计模式

本章目标

完成本章学习后，你将能够：

	*  理解常用设计模式
	*  在Python中实现经典设计模式
	*  选择合适的设计模式解决问题

创建型模式

单例模式


# 方式1：使用__new__
class Singleton:
    _instance = None
    
    def __new__(cls, *args, **kwargs):
        if cls._instance is None:
            cls._instance = super().__new__(cls)
        return cls._instance

# 方式2：使用装饰器
def singleton(cls):
    instances = {}
    def wrapper(*args, **kwargs):
        if cls not in instances:
            instances[cls] = cls(*args, **kwargs)
        return instanc…</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter18&amp;rev=1775716281&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:31:21+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter18</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter18&amp;rev=1775716281&amp;do=diff</link>
        <description>第十八章：文件操作

本章目标

完成本章学习后，你将能够：

	*  读写文本文件和二进制文件
	*  使用上下文管理器
	*  掌握文件系统操作
	*  处理CSV、JSON等格式

文件读写基础

打开文件


# 基本语法
f = open(&#039;file.txt&#039;, &#039;r&#039;, encoding=&#039;utf-8&#039;)
content = f.read()
f.close()

# 使用with语句（推荐）
with open(&#039;file.txt&#039;, &#039;r&#039;, encoding=&#039;utf-8&#039;) as f:
    content = f.read()
# 自动关闭文件</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter19&amp;rev=1775716306&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:31:46+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter19</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter19&amp;rev=1775716306&amp;do=diff</link>
        <description>第十九章：异常处理

本章目标

完成本章学习后，你将能够：

	*  理解异常处理机制
	*  捕获和处理各种异常
	*  创建自定义异常
	*  掌握异常处理最佳实践

异常基础

什么是异常

异常是程序执行过程中发生的错误事件，会中断正常程序流程。</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter20&amp;rev=1775716350&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:32:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter20</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter20&amp;rev=1775716350&amp;do=diff</link>
        <description>第二十章：序列化与数据格式

本章目标

完成本章学习后，你将能够：

	*  掌握JSON数据的解析和生成
	*  使用YAML配置文件
	*  使用pickle进行对象序列化
	*  处理CSV和XML数据
	*  选择合适的序列化格式</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter21&amp;rev=1775716375&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:32:55+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter21</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter21&amp;rev=1775716375&amp;do=diff</link>
        <description>第二十章：模块与包

本章目标

完成本章学习后，你将能够：

	*  创建和使用模块
	*  组织代码为包
	*  理解导入机制
	*  管理项目结构

模块基础

什么是模块

模块是包含Python定义和语句的文件，文件名即模块名加.py。</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter22&amp;rev=1775716397&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:33:17+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter22</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter22&amp;rev=1775716397&amp;do=diff</link>
        <description>第二十二章：虚拟环境与包管理

本章目标

完成本章学习后，你将能够：

	*  创建和管理虚拟环境
	*  使用pip管理包
	*  理解依赖管理
	*  打包和发布Python项目

虚拟环境

venv模块


# 创建虚拟环境
python -m venv myenv

# 激活
# Windows:
myenv\Scripts\activate

# macOS/Linux:
source myenv/bin/activate

# 退出
deactivate</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter23&amp;rev=1775716420&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:33:40+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter23</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter23&amp;rev=1775716420&amp;do=diff</link>
        <description>第二十三章：os与sys模块

本章目标

完成本章学习后，你将能够：

	*  使用os模块进行系统操作
	*  使用sys模块获取系统信息
	*  理解环境变量和命令行参数

os模块

文件和目录操作


import os

# 获取当前目录
print(os.getcwd())

# 改变目录
os.chdir(&#039;/path/to/dir&#039;)

# 列出目录内容
print(os.listdir(&#039;.&#039;))

# 创建目录
os.mkdir(&#039;new_dir&#039;)
os.makedirs(&#039;a/b/c&#039;, exist_ok=True)

# 删除
os.remove(&#039;file.txt&#039;)      # 删除文件
os.rmdir(&#039;empty_dir&#039;)      # 删除空目录

# 重命名
os.rename(&#039;old.txt&#039;, &#039;new.txt&#039;)…</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter24&amp;rev=1775716458&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:34:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter24</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter24&amp;rev=1775716458&amp;do=diff</link>
        <description>第二十四章：datetime模块

本章目标

完成本章学习后，你将能够：

	*  处理日期和时间
	*  进行时区转换
	*  格式化日期时间
	*  计算时间差

日期时间基础


from datetime import datetime, date, time, timedelta

# 当前日期时间
now = datetime.now()
print(now)  # 2024-01-15 10:30:45.123456

# 当前日期
today = date.today()
print(today)  # 2024-01-15

# 创建特定日期时间
dt = datetime(2024, 1, 15, 10, 30, 0)
d = date(2024, 1, 15)
t = time(10, 30, 0)…</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter25&amp;rev=1775716493&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:34:53+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter25</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter25&amp;rev=1775716493&amp;do=diff</link>
        <description>第二十五章：collections与itertools

本章目标

完成本章学习后，你将能够：

	*  使用collections的高级数据结构
	*  掌握itertools的迭代工具
	*  编写高效的迭代代码

collections模块


from collections import Counter, defaultdict, OrderedDict, deque, namedtuple

# Counter
words = [&#039;apple&#039;, &#039;banana&#039;, &#039;apple&#039;, &#039;cherry&#039;, &#039;banana&#039;, &#039;apple&#039;]
count = Counter(words)
print(count.most_common(2))  # [(&#039;apple&#039;, 3), (&#039;banana&#039;, 2)]

# defaultdict
groups = defaultdict(list)
for word in words:
    groups[len(word)].append(word)

# namedtuple
Point = namedtuple(&#039;Point…</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter26&amp;rev=1775716516&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:35:16+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter26</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter26&amp;rev=1775716516&amp;do=diff</link>
        <description>第二十六章：正则表达式

本章目标

完成本章学习后，你将能够：

	*  使用re模块处理正则表达式
	*  掌握常见正则模式
	*  进行文本匹配和替换

正则基础


import re

# 常用模式
# .      任意字符（除换行）
# \d     数字
# \w     单词字符
# \s     空白字符
# ^      开头
# $      结尾
# *      0次或多次
# +      1次或多次
# ?      0次或1次
# {n}    n次
# {n,m}  n到m次
# []     字符类
# |      或
# ()     分组…</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter27&amp;rev=1775716535&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:35:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter27</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter27&amp;rev=1775716535&amp;do=diff</link>
        <description>第二十七章：网络编程

本章目标

完成本章学习后，你将能够：

	*  使用socket进行网络通信
	*  使用http.client进行HTTP请求
	*  理解TCP/UDP编程

Socket编程


import socket

# 创建TCP客户端
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect((&#039;example.com&#039;, 80))
client.send(b&#039;GET / HTTP/1.1\r\nHost: example.com\r\n\r\n&#039;)
response = client.recv(4096)
client.close()</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter28&amp;rev=1775716703&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:38:23+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter28</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter28&amp;rev=1775716703&amp;do=diff</link>
        <description>第二十八章：多线程

本章目标

完成本章学习后，你将能够：

	*  创建和管理线程
	*  理解GIL
	*  使用线程同步机制
	*  掌握线程池

创建线程


import threading
import time

def worker(name):
    print(f&quot;{name} started&quot;)
    time.sleep(2)
    print(f&quot;{name} finished&quot;)

# 创建线程
thread1 = threading.Thread(target=worker, args=(&quot;Thread-1&quot;,))
thread2 = threading.Thread(target=worker, args=(&quot;Thread-2&quot;,))

# 启动线程
thread1.start()
thread2.start()

# 等待完成
thread1.join()
thread2.join()…</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter29&amp;rev=1775716721&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:38:41+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter29</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter29&amp;rev=1775716721&amp;do=diff</link>
        <description>第二十九章：多进程

本章目标

完成本章学习后，你将能够：

	*  创建和管理进程
	*  进程间通信
	*  使用进程池
	*  理解进程vs线程

创建进程


import multiprocessing
import time

def worker(name):
    print(f&quot;Process {name} started&quot;)
    time.sleep(2)
    print(f&quot;Process {name} finished&quot;)

if __name__ == &#039;__main__&#039;:
    # 创建进程
    p1 = multiprocessing.Process(target=worker, args=(&quot;P1&quot;,))
    p2 = multiprocessing.Process(target=worker, args=(&quot;P2&quot;,))
    
    p1.start()
    p2.start()
    
    p1.join()
    p2.join()…</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter30&amp;rev=1775716741&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:39:01+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter30</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter30&amp;rev=1775716741&amp;do=diff</link>
        <description>第三十章：异步编程

本章目标

完成本章学习后，你将能够：

	*  理解asyncio编程模型
	*  使用async/await
	*  创建和运行协程
	*  处理异步I/O

基础概念


import asyncio

async def hello():
    print(&quot;Hello&quot;)
    await asyncio.sleep(1)
    print(&quot;World&quot;)

# 运行
asyncio.run(hello())</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter31&amp;rev=1775716761&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:39:21+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter31</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter31&amp;rev=1775716761&amp;do=diff</link>
        <description>第三十一章：并发模式与最佳实践

本章目标

完成本章学习后，你将能够：

	*  选择合适的并发模型
	*  避免常见并发陷阱
	*  优化并发性能

并发模型选择
 场景  推荐方案   I/O密集型，大量连接</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter32&amp;rev=1775716853&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:40:53+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter32</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter32&amp;rev=1775716853&amp;do=diff</link>
        <description>第三十二章：SQLite数据库

本章目标

完成本章学习后，你将能够：

	*  使用sqlite3模块
	*  执行SQL语句
	*  处理事务
	*  防止SQL注入

基础操作


import sqlite3

# 连接数据库
conn = sqlite3.connect(&#039;example.db&#039;)
cursor = conn.cursor()

# 创建表
cursor.execute(&#039;&#039;&#039;
    CREATE TABLE IF NOT EXISTS users (
        id INTEGER PRIMARY KEY,
        name TEXT NOT NULL,
        email TEXT UNIQUE
    )
&#039;&#039;&#039;)

# 插入数据
cursor.execute(&quot;INSERT INTO users (name, email) VALUES (?, ?)&quot;,
               (&quot;Alice&quot;, &quot;alice@example.com&quot;))
conn.commit()

# 查询
cursor.execute(&quot;SELE…</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter33&amp;rev=1775716874&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:41:14+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter33</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter33&amp;rev=1775716874&amp;do=diff</link>
        <description>第三十三章：MySQL数据库

本章目标

完成本章学习后，你将能够：

	*  使用pymysql连接MySQL
	*  执行增删改查
	*  使用连接池

基础操作


import pymysql

# 连接数据库
conn = pymysql.connect(
    host=&#039;localhost&#039;,
    user=&#039;user&#039;,
    password=&#039;password&#039;,
    database=&#039;mydb&#039;,
    charset=&#039;utf8mb4&#039;
)

try:
    with conn.cursor() as cursor:
        # 创建表
        cursor.execute(&#039;&#039;&#039;
            CREATE TABLE IF NOT EXISTS users (
                id INT AUTO_INCREMENT PRIMARY KEY,
                name VARCHAR(100),
                email VARCHAR(100)
       …</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter34&amp;rev=1775716892&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:41:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter34</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter34&amp;rev=1775716892&amp;do=diff</link>
        <description>第三十四章：ORM与SQLAlchemy

本章目标

完成本章学习后，你将能够：

	*  理解ORM概念
	*  使用SQLAlchemy定义模型
	*  执行CRUD操作
	*  处理关系映射

SQLAlchemy基础


from sqlalchemy import create_engine, Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker

Base = declarative_base()

# 定义模型
class User(Base):
    __tablename__ = &#039;users&#039;
    
    id = Column(Integer, primary_key=True)
    name = Column(String(50))
    email = Column(String(100))
    
    def __repr__(self):
      …</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter35&amp;rev=1775716910&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:41:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter35</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter35&amp;rev=1775716910&amp;do=diff</link>
        <description>第三十五章：Flask Web开发

本章目标

完成本章学习后，你将能够：

	*  创建Flask应用
	*  定义路由和视图
	*  处理请求和响应
	*  使用模板

快速开始


from flask import Flask, jsonify, request, render_template

app = Flask(__name__)

@app.route(&#039;/&#039;)
def hello():
    return &#039;Hello, World!&#039;

@app.route(&#039;/user/&lt;name&gt;&#039;)
def user(name):
    return f&#039;Hello, {name}!&#039;

@app.route(&#039;/api/data&#039;, methods=[&#039;GET&#039;, &#039;POST&#039;])
def data():
    if request.method == &#039;POST&#039;:
        data = request.json
        return jsonify({&#039;received&#039;: data}), 201
    return jsonify({&#039;m…</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter36&amp;rev=1775716929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:42:09+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter36</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter36&amp;rev=1775716929&amp;do=diff</link>
        <description>第三十六章：Django Web开发

本章目标

完成本章学习后，你将能够：

	*  创建Django项目
	*  定义模型和视图
	*  使用Admin后台
	*  开发完整应用

快速开始

```bash
# 安装
pip install django

# 创建项目
django-admin startproject mysite</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter37&amp;rev=1775716947&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:42:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter37</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter37&amp;rev=1775716947&amp;do=diff</link>
        <description>第三十七章：网络爬虫实战

本章目标

完成本章学习后，你将能够：

	*  使用requests获取网页
	*  使用BeautifulSoup解析HTML
	*  使用Scrapy框架
	*  处理反爬虫机制

Requests基础


import requests

# GET请求
response = requests.get(&#039;https://api.github.com&#039;)
print(response.status_code)
print(response.json())

# 带参数
params = {&#039;q&#039;: &#039;python&#039;, &#039;page&#039;: 1}
response = requests.get(&#039;https://api.github.com/search/repositories&#039;, params=params)

# POST请求
data = {&#039;key&#039;: &#039;value&#039;}
response = requests.post(&#039;https://httpbin.org/post&#039;, json=data)

# 设置Headers
headers = {&#039;Us…</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter38&amp;rev=1775716965&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:42:45+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter38</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter38&amp;rev=1775716965&amp;do=diff</link>
        <description>第三十八章：数据分析项目

本章目标

完成本章学习后，你将能够：

	*  使用NumPy处理数值数据
	*  使用Pandas处理表格数据
	*  使用Matplotlib可视化
	*  完成完整数据分析流程

NumPy基础


import numpy as np

# 创建数组
arr = np.array([1, 2, 3, 4, 5])
matrix = np.array([[1, 2], [3, 4], [5, 6]])

# 特殊数组
zeros = np.zeros((3, 4))
ones = np.ones((2, 3))
identity = np.eye(3)

# 数组运算
arr + 10
arr * 2
np.sum(arr)
np.mean(arr)
np.std(arr)

# 索引和切片
arr[0]
matrix[0, 1]
matrix[:, 0]  # 第一列…</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter39&amp;rev=1775716988&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:43:08+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter39</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter39&amp;rev=1775716988&amp;do=diff</link>
        <description>第三十九章：Web应用项目

本章目标

完成本章学习后，你将能够：

	*  设计Web应用架构
	*  实现用户认证
	*  集成数据库
	*  部署Web应用

项目结构


myapp/
├── app/
│   ├── __init__.py
│   ├── models.py
│   ├── views.py
│   ├── forms.py
│   └── templates/
├── config.py
├── requirements.txt
└── run.py</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter40&amp;rev=1775717006&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:43:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter40</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter40&amp;rev=1775717006&amp;do=diff</link>
        <description>第四十章：自动化脚本

本章目标

完成本章学习后，你将能够：

	*  自动化文件操作
	*  自动化系统任务
	*  处理Excel和PDF
	*  发送邮件通知

文件自动化


import os
import shutil
from pathlib import Path

# 批量重命名
for i, file in enumerate(os.listdir(&#039;.&#039;)):
    if file.endswith(&#039;.txt&#039;):
        os.rename(file, f&#039;doc_{i:03d}.txt&#039;)

# 按扩展名整理文件
for file in Path(&#039;.&#039;).iterdir():
    if file.is_file():
        ext = file.suffix[1:] or &#039;no_ext&#039;
        os.makedirs(ext, exist_ok=True)
        shutil.move(str(file), f&quot;{ext}/{file.name}&quot;)…</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter41&amp;rev=1775717025&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:43:45+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter41</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter41&amp;rev=1775717025&amp;do=diff</link>
        <description>第四十一章：测试与调试

本章目标

完成本章学习后，你将能够：

	*  编写单元测试
	*  使用pytest框架
	*  使用调试器
	*  进行性能分析

unittest模块


import unittest

def add(a, b):
    return a + b

class TestMath(unittest.TestCase):
    def test_add(self):
        self.assertEqual(add(2, 3), 5)
        self.assertEqual(add(-1, 1), 0)
    
    def test_add_type_error(self):
        with self.assertRaises(TypeError):
            add(&quot;a&quot;, 1)

if __name__ == &#039;__main__&#039;:
    unittest.main()…</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter42&amp;rev=1775717045&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:44:05+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter42</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter42&amp;rev=1775717045&amp;do=diff</link>
        <description>第四十二章：项目结构

本章目标

完成本章学习后，你将能够：

	*  组织Python项目结构
	*  编写配置文件
	*  管理依赖
	*  发布项目到PyPI

项目结构


my_project/
├── src/
│   └── my_package/
│       ├── __init__.py
│       ├── module1.py
│       └── module2.py
├── tests/
│   ├── __init__.py
│   └── test_module1.py
├── docs/
├── .gitignore
├── LICENSE
├── README.md
├── pyproject.toml
└── requirements.txt…</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter43&amp;rev=1775717063&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:44:23+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter43</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter43&amp;rev=1775717063&amp;do=diff</link>
        <description>第四十三章：性能优化

本章目标

完成本章学习后，你将能够：

	*  分析代码性能瓶颈
	*  使用高效的数据结构和算法
	*  使用Cython加速
	*  进行并发优化

性能分析


import cProfile
import pstats

# 分析代码
cProfile.run(&#039;my_function()&#039;, &#039;output.stats&#039;)

# 查看统计
p = pstats.Stats(&#039;output.stats&#039;)
p.sort_stats(&#039;cumulative&#039;).print_stats(10)</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:chapter44&amp;rev=1775717085&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-09T06:44:45+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chapter44</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:chapter44&amp;rev=1775717085&amp;do=diff</link>
        <description>第四十四章：附录与资源

附录A：Python内置函数
 函数  描述 ------------ abs()  绝对值  all()  所有元素为真  any()  任一元素为真  bin()  转二进制字符串  bool()  转布尔值  chr()  ASCII码转字符  dict()</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:nuitka&amp;rev=1767754235&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-01-07T02:50:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>nuitka</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:nuitka&amp;rev=1767754235&amp;do=diff</link>
        <description>Nuitka Python 打包指南

Nuitka 是一个 Python 编译器，它是目前 Python 打包成可执行文件（EXE）方案中，安全性（防反编译）和运行效率最高的工具之一。

尽量不要有中文路径，python版本要合适。</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:pandas&amp;rev=1767751811&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-01-07T02:10:11+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>pandas</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:pandas&amp;rev=1767751811&amp;do=diff</link>
        <description>Python Pandas 基础教程

Pandas 是 Python 中最流行的数据分析和处理库。它提供了高性能、易于使用的数据结构和数据分析工具。

1. 安装与导入

在使用 Pandas 之前，你需要确保已经安装了它。通常我们会结合 `numpy` 一起使用。</description>
    </item>
    <item rdf:about="https://www.zhuzhugst.com/doku.php?id=python:pyinstall&amp;rev=1767754812&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-01-07T03:00:12+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>pyinstall</title>
        <link>https://www.zhuzhugst.com/doku.php?id=python:pyinstall&amp;rev=1767754812&amp;do=diff</link>
        <description>PyInstaller 使用教程 (Python 打包指南)

PyInstaller 是一个非常流行的 Python 打包工具，它可以将 Python 脚本及其依赖项打包成一个独立的可执行文件（如 Windows 下的 .exe），使得在没有安装 Python 环境的机器上也能运行程序。</description>
    </item>
</rdf:RDF>
