共 19 节,按顺序
- 120 分钟
你好,Python
VariablesPrintRepl - 225 分钟
数字与字符串
IntegersFloatsString concatenationF-strings - 315 分钟
Asking the User a Question
Input()String return typeInt() and float() conversionInteractive programs - 430 分钟
控制流
If/elif/elseComparison operatorsBoolean operatorsWhile loopsFor loopsBreak and continue - 530 分钟
列表与元组
List creationIndexingSlicingAppendPopIteration+2 - 630 分钟
字典与集合
Dict basicsGet with defaultIterate keysIterate valuesIterate itemsSets+1 - 730 分钟
函数
DefParametersDefault valuesKeyword arguments*args and **kwargsReturn values+1 - 825 分钟
推导式 (Comprehensions)
List comprehensionsDict comprehensionsSet comprehensionsConditional expressionsReadability tradeoffs - 930 分钟
文件与 IO
Open with withReading linesWriting filesPathlib.PathJson readJson write - 1030 分钟
模块与包 (Modules and Packages)
ImportFrom importWriting your own moduleIf __name__ == "__main__"Packages__init__.py - 1135 分钟
类与 OOP
Class definition__init__Instance attributesClass attributesMethods__repr__ - 1230 分钟
继承与组合
SubclassingSuper()Method overridingCompositionWhen to choose composition - 1330 分钟
异常处理
TryExceptElseFinallyRaiseCustom exception classes+1 - 1430 分钟
迭代器与生成器 (Iterators and Generators)
Iterator protocolYieldGenerator functionsGenerator expressionsLazy evaluation - 1530 分钟
装饰器 (Decorators)
Functions are objectsWrapper functions@decorator syntaxFunctools.wrapsParametrized decorators - 1625 分钟
上下文管理器 (Context Managers)
With statement__enter__ and __exit__Writing your own context managerContextlib.contextmanager - 1740 分钟
并发:线程与异步 (Async)
GIL in plain languageConcurrent.futures.ThreadPoolExecutorAsyncio basicsAsync defAwaitWhen to use threads vs async - 1835 分钟
使用 pytest 进行测试
Test functionsAssertRunning pytestParametrizeFixtures - 1935 分钟
打包与部署
Pyproject.tomlPip install -eConsole scriptsBuilding a wheelPublishing to PyPI
用你的语言学习 Python
每一节课、测验和导师回复都以你的语言显示。AI 导师会用你提问的语言来回答。
Roles that use Python
See how hiring teams interview engineers on Python, in production-like environments.
Interview role
Senior Python Developer
Hire senior Python developers in real Django, FastAPI and Flask codebases with real load and real test suites. Live or take-home, fully recorded.
See the interviewInterview role
Backend Engineer (Go, Rust, Java)
Hire backend engineers in real services with real databases, real concurrency and real latency budgets. Live or take-home, fully recorded.
See the interviewInterview role
Data Engineer
Hire data engineers in workspaces with real Spark, dbt and Airflow pipelines. Schema drift, bad data and reruns included.
See the interview