☰
成为合作伙伴
Python 学习笔记
Python 学习笔记
适合学生阅读的简明笔记,涵盖 Python 基础、编程习惯、调试练习和项目准备。
Channel Archive
本频道最新文章。
先浏览最新资源,再打开文章阅读完整讲解与练习说明。
What Is a Dry Run? Trace an Algorithm with a State Table
Use a small input and a trace table to locate the first state that differs from what the algorithm should produce.
Why Should You Write Brute Force First? Define the Complete Search Space
Define every candidate, estimate the full search space, build a correct baseline, and only then add pruning or memoization.
What Does Big O Mean? Think About Growth Before Memorizing a Table
Understand O(1), O(N), and O(N²) by counting how work grows, then compare that growth with the input constraints.
CCC Grid Problems: From Simulation to Graph Search
Recognize three generations of grid problems: cell-by-cell simulation, structural counting, and graph search with DFS or BFS.
What Problems Are Python Sets Best At Solving?
Learn when to use a set for deduplication, fast membership checks, and set operations, and when a list or dict is the better tool.
What Is a Dry Run? Trace Your Code Before Running It
Trace code with small inputs and variable tables to catch boundary, initialization, and update-order mistakes.
Why Does Greedy Sorting Always Work? The Exchange Argument with Time on Task
Use CCC 2013 Time on Task to understand shortest-first greedy selection and prove it with an exchange argument.
How Do You Build and Traverse a 2D List?
Learn how to build, index, read, and traverse Python 2D lists while avoiding shared-row aliasing mistakes.
新手最容易写出的死循环
理解 while 循环为何停不下来,并学会让停止条件真正能够发生。
for 和 while 到底怎么选?
从已有内容、固定次数和停止条件出发,选择最适合问题的 Python 循环。
append() 和 + 有什么区别?
一篇适合初学者的 Python 笔记,讲清楚 append()、+、extend()、嵌套列表和列表合并。
一分钟看懂字符串切片
一篇适合初学者的 Python 笔记,讲清楚 word[1:4]、包含 start、不包含 stop,以及切片边界。
= 和 == 到底差在哪?
一篇适合初学者的 Python 笔记,讲清楚赋值、相等比较,以及如何写对 if 条件判断。
变量不是盒子,更像标签
一篇适合初学者的 Python 笔记,帮助学生把变量理解成指向对象的名字标签。
print() 不只是打印一句话
一篇适合初学者的 Python 笔记,讲清楚如何用 sep 和 end 控制输出格式。
Python 可读性:为什么清楚比炫技重要
从 The Zen of Python 出发,用清楚的变量名和小步骤,写出别人也能看懂的代码。
学 Python,别一开始就背语法
用小问题、示例和修改练习,把 Python 语法学成解决问题的工具。
Python 语法基础:print、变量与类型
一篇适合初学者的 Python 笔记,介绍 print()、注释、变量命名、基础类型,以及做数学运算前如何转换输入。
用 Codex 助力 Python JamHack 竞赛准备
学生如何把 Codex 用作规划、调试和复盘伙伴,同时始终把自己的思考放在中心。
为什么学习 Python?从可读性开始,而不是从语法开始
一篇基于 Phase I 讲义的 Python 学习笔记:为什么 Python 适合作为第一门语言,以及初学者为什么应先理解可读性,而不是急着背语法。
返回资源库。
在一个入口浏览 CP 每周挑战、Python 学习笔记和 AI 素养文章。