Think Python First Edition
小编:本书针对python2,python3可看该书第二版
Think Python is an introduction to Python programming for beginners. It starts with basic concepts of programming, and is carefully designed to define all terms when they are first used and to develop each new concept in a logical progression. Larger pieces, like recursion and object-oriented programming are divided into a sequence of smaller steps and introduced over the course of several chapters.
Some examples and exercises are based on Swampy, a Python package written by the author to demonstrate aspects of software design, and to give readers a chance to experiment with simple graphics and animation.
Think Python is a Free Book. It is available under the Creative Commons Attribution-NonCommercial 3.0 Unported License, which means that you are free to copy, distribute, and modify it, as long as you attribute the work and don’t use it for commercial purposes.
If you have comments, corrections or suggestions, please send me email at feedback{at}thinkpython{dot}com.
Other Free Books by Allen Downey are available from Green Tea Press.
目录
- Preface
- The way of the program
- Variables, expressions and statements
- Functions
- Function calls
- Type conversion functions
- Math functions
- Composition
- Adding new functions
- Definitions and uses
- Flow of execution
- Parameters and arguments
- Variables and parameters are local
- Stack diagrams
- Fruitful functions and void functions
- Why functions?
- Importing with from
- Debugging
- Glossary
- Exercises
- Case study: interface design
- Conditionals and recursion
- Fruitful functions
- Iteration
- Strings
- Case study: word play
- Lists
- Dictionaries
- Tuples
- Case study: data structure selection
- Files
- Classes and objects
- Classes and functions
- Classes and methods
- Inheritance
- Case study: Tkinter
- Debugging
- Analysis of Algorithms
- Lumpy
- Index