Learn Python with Lao Qi: From Beginner to Mastery
Tags
Summary
Editor's review
Who it's for
A good fit for
- 完全没写过代码、想从零开始学Python的成年人自学
- 上过一点编程课但基础不牢、需要系统梳理语法与数据结构的在校学生
- 习惯看中文讲解、希望有人“边讲边敲”的转行学习者
- 需要一本覆盖面向对象、模块与数据库的基础教材做课后配套的培训班学员
Not a good fit for
- 已有扎实Python基础、想找进阶技巧或工程实践手册的开发者
- 需要使用Python 3最新语法与第三方库最新版本的读者(本书示例偏旧)
- 希望直接做机器学习、爬虫或Web后端项目实战、不愿从头学语法的人
Reading tips
- 建议边读边敲,每章的示例代码都亲手运行一遍,尤其把书中的练习题当作检验标准。
- 遇到涉及Python 2时代的写法(如raw_input、urllib2),先去官方文档查对应Python 3的用法,再做迁移。
- 按“基础—进阶—实战”的顺序阅读,不必一次读完;第一季扎实后再进入面向对象部分。
- 读完后用Tornado小网站与Pandas示例做一次完整复现,作为检验学习效果的项目。
About the publisher
The Publishing House of Electronics Industry is a comprehensive publisher distinguished by its focus on electronic information and related fields. Judging from the more than 3,000 titles in its catalogue, its publishing covers programming and design, artificial intelligence, computer science, finance and economics, photography, and social sciences, attending both to cutting-edge technology and to general readers. Representative titles include Factor Investing: Methods and Practice, x86 Assembly Language: From Real Mode to Protected Mode, The RISC-V Reader, Artificial Intelligence: Speech Recognition, Understanding and Practice, Phased Array Radar Technology, Radar Target Characteristics, and 100 Go Mistakes and How to Avoid Them, most of which centre on technical methods and engineering practice. Its authors include Shi Chuan, Li Zhong, Wang Xiaobo, David Patterson, Andrew Waterman, and Yu Zihao, among others from China and abroad. Owing to limited public information, no further publishing features are elaborated here.
Contents
- Season 1 Basics
- Chapter 0 Preliminaries: 0.1 The Story of Python (Python's past, present, and future; Python's features; the Zen of Python); 0.2 From Handyman to Expert (starting from zero; reading code; debugging programs); 0.3 Installing Python (Ubuntu, Windows, Mac OS X); 0.4 Integrated Development Environments (IDEs) (Hello world; overview of IDEs; Python IDEs)
- Chapter 1 Basic Object Types: 1.1 Numbers (variables; simple arithmetic; integer overflow); 1.2 Division (integer by integer; float by integer; using modules to solve division; remainders; rounding); 1.3 Common Math Functions and Operator Precedence; 1.4 A First Simple Program; 1.5 Strings (concatenation; escape characters; raw strings; input and output; indexing and slicing; common methods; formatted output); 1.6 Character Encoding (encode and decode; garbled Chinese text); 1.7 Lists; 1.8 Comparison
- Chapter 2 Statements and Files: 2.1 Operators (arithmetic, comparison, logical); 2.2 Simple Statements (print, import, assignment); 2.3 Conditionals (if, if…elif…else, ternary operator); 2.4 for Loops (range, zip, enumerate, list comprehensions); 2.5 while Loops (guess-the-number game, break and continue, while…else, for…else); 2.6 Files (opening, creating, with, file status, r)
- Chapter 3 Functions: 3.1 Understanding Functions (defining, naming, calling, return values, docstrings); 3.2 Terms Distinguished (parameters and variables, global and local variables, namespaces); 3.3 Collecting Parameters; 3.4 Special Functions (recursion, etc.); 3.5 Exercises (solving a quadratic equation, tallying exam scores, finding primes)
- Season 2 Advanced
- Chapter 4 Classes: 4.1 Basic Concepts; 4.2 Classes in Detail (new-style and old-style classes, methods and instances, self); 4.3 Class and Instance Attributes, Namespaces, Scope; 4.4 Inheritance (multiple inheritance, super); 4.5 Methods (bound, unbound, static and class methods); 4.6 Polymorphism and Encapsulation; 4.7 Special Attributes and Methods (__dict__, __slots__, __getattr__, etc.); 4.8 Iterators; 4.9 Generators (yield, generator methods)
- Chapter 5 Errors and Exceptions: errors, exceptions, handling exceptions (try…except, multiple exceptions, else, finally, assert)
- Chapter 6 Modules: writing modules (module location, __all__, packages and libraries); batteries included; the standard library (sys, copy, os, heapq, deque, calendar, time, datetime, urllib, XML, JSON); third-party libraries (installation and a requests example)
- Chapter 7 Saving Data: pickle, shelve, MySQL, MongoDB, SQLite, spreadsheets
- Season 3 Hands-On
- Chapter 8 Building a Website with Tornado: preparing to build a site, analyzing Hello, building a simple site (database connection, login page, data transmission and handling, templates, CSS, cookies and security, XSRF, user authentication, synchronous and asynchronous)
- Chapter 9 Scientific Computing: preparing to compute, Pandas (basic data structures, reading CSV files, processing stock data)
FAQ
这本书适合完全没有编程基础的人吗?
这本书讲的是Python 2还是Python 3?
“从入门到精通”真的能到精通吗?
书名同为《跟老齐学Python》,怎么区分版本?
Comments
Find this book
This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.
About the author
Qi Wei is an author about whom little public information is available; no systematic account of his identity or career has yet appeared. His two works in the library nonetheless indicate his main writing interests. He focuses on artificial intelligence and programming design, and is the author of Data Preparation and Feature Engineering: Essential Skills for Data Engineers and Mathematical Foundations of Machine Learning. The first addresses practical aspects of data engineering, including data cleaning, organization, and feature construction; the second returns to the mathematical principles behind machine learning, helping readers build a theoretical foundation. Together, the two books show a style that values both fundamentals and hands-on practice, with clear and accessible language suitable for beginners and advanced readers alike.