- Python 简介与环境配置
- Python 能做什么
- 安装 Python 与常用 IDE(VSCode/PyCharm)
- 编写第一个程序:print("Hello, world!")
- 基本数据类型与变量
- 数字(int, float)
- 字符串(str)及基本操作
- 布尔值(bool)
- 变量命名与赋值
- 运算符
- 算术运算符:+ - * / // % **
- 比较运算符:== != > < >= <=
- 逻辑运算符:and or not
- 赋值运算符:= += -= ...
- 输入与输出
- input() 获取用户输入
- print() 输出信息
- 流程控制
- 条件语句:if / elif / else
- 缩进规范
- 循环语句
- while 循环
- for 循环与 range()
- break 和 continue
- 列表(list)
- 创建、访问、切片、遍历
- 常用方法:append(), pop(), sort()
- 元组(tuple)与字符串进阶
- 不可变序列
- 解包、嵌套
- 字符串格式化:f-string, % , format()
- 字典(dict)
- 创建、访问、增删改查
- 遍历与嵌套字典
- 集合(set)
- 特点与常用操作
- 并、交、差、子集判断
- 函数基础
- 定义与调用
- 形参、实参、默认参数、关键字参数
- return 返回值
- 作用域与命名空间
- 局部变量与全局变量
- global 与 nonlocal
- 异常处理
- try / except / finally / else
- raise, assert
- 模块与包
- import / from ... import ...
- name == "main" 的意义
- pip 安装第三方模块
- 文件操作
- 读写文本文件:open, read, write
- 上下文管理器:with open()
- 文件路径与编码
- 函数进阶
- 匿名函数 lambda
- 高阶函数:map, filter, reduce
- 列表/字典推导式
- 类与对象
- class 定义与实例化
- 构造方法 init
- 成员变量与方法
- 封装、继承、多态
- 私有属性与方法:_name, __name
- 子类继承与方法重写
- super() 的使用
- 类的特殊方法
- str, repr, len, eq
- 运算符重载
- 标准库简介
- math, random, datetime, os, sys
- 实用工具
- 迭代器与生成器
- 装饰器基础
- zip, enumerate, any, all
- 正则表达式(re 模块)
- 匹配模式
- 查找、替换、分组提取
- 命令行工具项目
- 数据处理(csv, pandas 简介)
- GUI 编程(tkinter)
- 网络爬虫(requests, BeautifulSoup)
- 期末综合项目
本教程适合零基础到进阶学习者,建议按顺序学习,每一阶段都配有实例与练习题,帮助你逐步掌握 Python 编程。
Welcome to the complete Python tutorial series. This course is designed to take you from zero to practical Python programming, step by step.
# | Chapter | Description |
---|---|---|
01 | Introduction and Setup | Install Python, run your first script |
02 | Basic Data Types and Variables | Numbers, strings, booleans, and variables |
03 | Operators and Expressions | Arithmetic, comparison, logic |
04 | Control Flow: If-Else | Making decisions with if/elif/else |
05 | Loops and Iteration | for , while , break , continue |
06 | Lists and Basic Operations | Lists, indexing, slicing |
07 | Tuples and Strings | Immutable sequences and string formatting |
08 | Dictionaries and Nested Structures | Key-value storage and loops |
09 | Sets and Set Operations | Unique elements and set math |
10 | Functions and Parameters | Defining, calling, returning values |
11 | Variable Scope and Namespace | Local vs global, global , nonlocal |
12 | Exception Handling | try , except , raise , assert |
13 | Modules and Packages | import , pip, main function |
14 | File Operations | Reading and writing files |
15 | Advanced Functions | lambda , map , list comprehension |
16 | Classes and Objects | Basic OOP structure |
17 | OOP: Encapsulation & Inheritance | Inheritance, access control |
18 | Magic Methods and Overloading | __str__ , __eq__ , operator overloading |
19 | Standard Library Overview | math , random , datetime , os |
20 | Practical Python Tools | Iterators, zip , enumerate |
21 | Regular Expressions | Pattern matching and text search |
22 | CLI Tools Project | Build command-line apps |
23 | Data Handling with CSV and Pandas | csv , intro to pandas |
24 | GUI Programming with Tkinter | Create simple desktop apps |
25 | Web Scraping with Python | Use requests , BeautifulSoup |
26 | Final Projects | Capstone mini-projects |