Python 基础
50 课
开始使用 Python——变量、数据类型、函数、列表、字典和模块。
-
1 Python Overview
什么 Python 是, 哪里它 运行, and 为什么它 是 one 的大多数 popular languages for 初学者 and professionals alike.
-
2 Python 变量
如何 创建 and use 变量 in Python — 动态输入, naming, and assignment.
-
3 Python 数据类型
Python's 核心数据类型: 数字, 字符串, 布尔值, 列表, tuples, dictionaries, and 设置.
-
4 条件 and 循环
制作 decisions 使用如果/elif/else and repeating 使用 for and 虽然循环.
-
5 Python 函数
定义函数使用 def, 参数, 返回值, and 默认实参.
-
6 Python 字符串
Master Python 字符串: slicing, 方法, f-字符串, 格式化, and encoding for 文本处理.
-
7 Python 列表
工作使用列表: indexing, slicing, 方法, 排序, and 列表 comprehensions for 有序集合.
-
8 Python Dictionaries
键-值映射使用 dicts: creation, access, 方法, iteration, and nested 结构.
-
9 Python Tuples
不可变序列使用 tuples: creation, packing, unpacking, and 当到 use 它们 over 列表.
-
10 Python 设置
Unordered 集合的 唯一元素: 设置操作, frozenset, and deduplication.
-
11 File Handling in Python
读取 and 编写 files 使用打开(), 模式, 使用语句, and path 操作使用 pathlib.
-
12 异常 and 错误 Handling
Handle 错误 gracefully 使用 try/except/else/最后, raise 异常, and 创建自定义 ones.
-
13 类 and 对象
对象-oriented programming in Python: 类, 实例, 方法, attributes, and __init__.
-
14 继承 and 多态
Extend 类使用继承, override 方法, use super(), and leverage 多态.
-
15 Python 模块
组织 code 到模块使用导入, 从-导入, __name__, and 标准库.
-
16 Python 包
结构 multi-file 项目使用包, __init__.py, 相对导入, and 命名空间包.
-
17 虚拟环境
Isolate 项目 dependencies 使用 venv, activate and deactivate, and manage 多个 Python versions.
-
18 pip and 包 Management
安装, upgrade, and manage Python 包使用 pip, PyPI, and pyproject.toml.
-
19 列表 Comprehensions
编写 concise, readable 列表 transformations 使用 comprehensions, 筛选, and nested 循环.
-
20 Lambda 函数
Anonymous 函数使用 lambda: 语法, use 使用映射/筛选/排序, and 当到 avoid 它们.
-
21 Decorators
Transform 函数使用 decorators: @ 语法, functools.wraps, and practical decorator 模式.
-
22 Generators
创建 lazy, memory-efficient 序列使用 generator 函数, yield, and generator 表达式.
-
23 Iterators and Iterables
理解 iterator protocol: __iter__, __next__, iter(), 下一个(), and 自定义 iterables.
-
24 上下文 Managers
Manage resources 使用使用语句: __enter__/__exit__, contextlib, and 异步上下文 managers.
-
25 类型 Hints
添加静态类型 annotations 使用类型 hints, 输入模块, and mypy for 类型检查.
-
26 Dates and 次数
工作使用 dates and 次数 using datetime, timedelta, 格式化, timezones, and parsing.
-
27 JSON Handling
Parse, generate, and 验证 JSON 使用 JSON 模块, 自定义 encoders, and 错误 handling.
-
28 Regular 表达式
Match and extract 文本模式使用 re 模块: 搜索, match, 分组, and substitution.
-
29 单元测试基础
编写 and 运行测试使用 unittest and pytest: assertions, fixtures, mocking, and coverage.
-
30 Python 最佳实践
编写 idiomatic, clean Python: PEP 8, naming, 项目结构, tooling, and 常见约定.
-
31 装饰器深入
全面讲解 Python 中的装饰器深入,涵盖核心概念、实现细节和实际示例。
-
32 上下文管理器与 with 语句
全面讲解 Python 中的上下文管理器与 with 语句,涵盖核心概念、实现细节和实际示例。
-
33 元类与类创建
全面讲解 Python 中的元类与类创建,涵盖核心概念、实现细节和实际示例。
-
34 描述符与属性访问
全面讲解 Python 中的描述符与属性访问,涵盖核心概念、实现细节和实际示例。
-
35 生成器与 yield
全面讲解 Python 中的生成器与 yield,涵盖核心概念、实现细节和实际示例。
-
36 async/await 与 asyncio
全面讲解 Python 中的 async/await 与 asyncio,涵盖核心概念、实现细节和实际示例。
-
37 类型提示与 mypy
全面讲解 Python 中的类型提示与 mypy,涵盖核心概念、实现细节和实际示例。
-
38 Dataclasses 数据类
全面讲解 Python 中的 Dataclasses 数据类,涵盖核心概念、实现细节和实际示例。
-
39 property 与 __slots__
全面讲解 Python 中的 property 与 __slots__,涵盖核心概念、实现细节和实际示例。
-
40 抽象基类
全面讲解 Python 中的抽象基类,涵盖核心概念、实现细节和实际示例。
-
41 多重继承与 MRO
全面讲解 Python 中的多重继承与 MRO,涵盖核心概念、实现细节和实际示例。
-
42 双下划线方法与运算符重载
全面讲解 Python 中的双下划线方法与运算符重载,涵盖核心概念、实现细节和实际示例。
-
43 memoryview 与缓冲区
全面讲解 Python 中的 memoryview 与缓冲区,涵盖核心概念、实现细节和实际示例。
-
44 collections 模块
全面讲解 Python 中的 collections 模块,涵盖核心概念、实现细节和实际示例。
-
45 itertools 模块
全面讲解 Python 中的 itertools 模块,涵盖核心概念、实现细节和实际示例。
-
46 functools 模块
全面讲解 Python 中的 functools 模块,涵盖核心概念、实现细节和实际示例。
-
47 threading 并发编程
全面讲解 Python 中的 threading 并发编程,涵盖核心概念、实现细节和实际示例。
-
48 Multiprocessing 多进程
全面讲解 Python 中的 Multiprocessing 多进程,涵盖核心概念、实现细节和实际示例。
-
49 ctypes C 扩展
全面讲解 Python 中的 ctypes C 扩展,涵盖核心概念、实现细节和实际示例。
-
50 pyproject.toml 打包
全面讲解 Python 中的 pyproject.toml 打包,涵盖核心概念、实现细节和实际示例。
学习阶段
预计总时长: 14h 25m- 1
基础
13 课 · 2h 10m掌握基本概念与语法,建立扎实基础。
0/13 核心
13 课 · 3h 15m深入理解核心模式与常见用例。
0/13进阶
12 课 · 4h攻克进阶主题,开始流畅组合所学概念。
0/12高级
12 课 · 5h掌握高级技巧并应用于真实问题。
0/12
完成标准
完成 80% 课程、60% 练习和 50% 项目 即可掌握该主题。
- 课程0 / 200%
- 练习0 / 1000%
- 项目0 / 100%
技能评估
0 / 20 已掌握- Python 语法与变量基础0 / 4 课 · 0%
- Python 数据结构核心0 / 6 课 · 0%
- Python 函数核心0 / 4 课 · 0%
- Python 面向对象进阶0 / 3 课 · 0%
- 模块与包核心0 / 4 课 · 0%
- Python 高级特性高级0 / 4 课 · 0%
- Python 异步与并发高级0 / 3 课 · 0%
- Python 测试进阶0 / 2 课 · 0%
+12 更多技能
动手做项目
通过引导式项目应用所学,含起始代码与解决方案。
解读错误信息
用大白话解释常见错误——什么意思、为什么发生、如何修复。