The Quick Python Book, Third Edition
Naomi Ceder
  • MEAP began December 2016
  • Publication in Summer 2017 (estimated)
  • ISBN 9781617294037
  • 400 pages (estimated)
  • printed in black & white

This third revision of Manning's popular The Quick Python Book offers a clear, crisp updated introduction to the elegant Python programming language and its famously easy-to-read syntax. Written for programmers new to Python, this latest edition includes new exercises throughout. It covers features common to other languages concisely, while introducing Python's comprehensive standard functions library and unique features in detail.

After exploring Python's syntax, control flow, and basic data structures, the book shows how to create and deploy full applications and larger code libraries. It addresses established Python features as well as the advanced object-oriented options available in Python 3. Along the way, you'll survey the current Python development landscape, including Pythonic best practices, data extraction and cleaning, database access, and web frameworks.

Table of Contents detailed table of contents

Part 1: Starting out

1. About Python

1.1. Why should I use Python?

1.2. What Python does well

1.2.1. Python is easy to use

1.2.2. Python is expressive

1.2.3. Python is readable

1.2.4. Python is complete - "batteries included"

1.2.5. Python is cross-platform

1.2.6. Python is free

1.3. What Python doesn't do as well

1.3.1. Python is not the fastest language

1.3.2. Python doesn't have the most libraries

1.3.3. Python doesn't check variable types at compile time

1.3.4. Python doesn't have much mobile support

1.3.5. Python doesn't use multiple processors well

1.4. Why learn Python 3?

1.5. Summary

2. Getting started

2.1. Installing Python

2.2. IDLE and the basic interactive mode

2.2.1. The basic interactive mode

2.2.2. The IDLE integrated development environment

2.2.3. Choosing between basic interactive mode and IDLE

2.3. Using IDLE's Python Shell window

2.4. Hello, world

2.5. Using the interactive prompt to explore Python

2.6. Summary

3. The Quick Python overview

3.1. Python synopsis

3.2. Built-in data types

3.2.1. Numbers

3.2.2. Lists

3.2.3. Tuples

3.2.4. Strings

3.2.5. Dictionaries

3.2.6. Sets

3.2.7. File objects

3.3. Control flow structures

3.3.1. Boolean values and expressions

3.3.2. The if-elif-else statement

3.3.3. The while loop

3.3.4. The for loop

3.3.5. Function definition

3.3.6. Exceptions

3.3.7. Context handling using with

3.4. Module creation

3.5. Object-oriented programming

3.6. Summary

Part 2: The essentials

4. The absolute basics

4.1. Indentation and block structuring

4.2. Differentiating comments

4.3. Variables and assignments

4.4. Expressions

4.5. Strings

4.6. Numbers

4.6.1. Built-in numeric functions

4.6.2. Advanced numeric functions

4.6.3. Numeric computation

4.6.4. Complex numbers

4.6.5. Advanced complex-number functions

4.7. The None value

4.8. Getting input from the user

4.9. Built-in operators

4.10. Basic Python style

4.11. Summary

5. Lists, tuples, and sets

5.1. Lists are like arrays

5.2. List indices

5.3. Modifying lists

5.4. Sorting lists

5.4.1. Custom sorting

5.4.2. The sorted() function

5.5. Other common list operations

5.5.1. List membership with the in operator

5.5.2. List concatenation with the + operator

5.5.3. List initialization with the * operator

5.5.4. List minimum or maximum with min and max

5.5.5. List search with index

5.5.6. List matches with count

5.5.7. Summary of list operations

5.6. Nested lists and deep copies

5.7. Tuples

5.7.1. Tuple basics

5.7.2. One-element tuples need a comma

5.7.3. Packing and unpacking tuples

5.7.4. Converting between lists and tuples

5.8. Sets

5.8.1. Set operations

5.8.2. Frozensets

5.9. Summary

6. Strings

6.1. Strings as sequences of characters

6.2. Basic string operations

6.3. Special characters and escape sequences

6.3.1. Basic escape sequences

6.3.2. Numeric (octal and hexadecimal) and Unicode escape sequences

6.3.3. Printing vs. evaluating strings with special characters

6.4. String methods

6.4.1. The split and join string methods

6.4.2. Converting strings to numbers

6.4.3. Getting rid of extra whitespace

6.4.4. String searching

6.4.5. Modifying strings

6.4.6. Modifying strings with list manipulations

6.4.7. Useful methods and constants

6.5. Converting from objects to strings

6.6. Using the format method

6.6.1. The format method and positional parameters

6.6.2. The format method and named parameters

6.6.3. Format specifiers

6.7. Formatting strings with %

6.7.1. Using formatting sequences

6.7.2. Named parameters and formatting sequences

6.8. String Interpolation

6.9. Bytes

6.10. Summary

7. Dictionaries

7.1. What is a dictionary?

7.1.1. Why dictionaries are called dictionaries

7.2. Other dictionary operations

7.3. Word counting

7.4. What can be used as a key?

7.5. Sparse matrices

7.6. Dictionaries as caches

7.7. Efficiency of dictionaries

7.8. Summary

8. Control flow

8.1. The while loop

8.1.1. The break and continue statements

8.2. The if-elif-else statement

8.3. The for loop

8.3.1. The range function

8.3.2. Using break and continue in for loops

8.3.3. The for loop and tuple unpacking

8.3.4. The enumerate function

8.3.5. The zip function

8.4. List and dictionary comprehensions

8.4.1. Generator Expressions

8.5. Statements, blocks, and indentation

8.6. Boolean values and expressions

8.6.1. Most Python objects can be used as Booleans

8.6.2. Comparison and Boolean operators

8.7. Writing a simple program to analyze a text file

8.8. Summary

9. Functions

10. Modules and scoping rules

11. Python programs

12. Using the filesystem

13. Reading and writing files

14. Exceptions

Part 3: Advanced language features

15. Classes and object-oriented programming

16. Regular expressions

17. Data types as objects

18. Packages

19. Using Python libraries

Part 4: Data handling

20. Handling Files

21. Processing Data Files

22. Data over the Network

23. Databases

24. Manipulating Data

What's inside

  • Concepts and Python 3 features
  • Regular expressions and OOP aspects
  • Python packaging and tools
  • Lots of exercises
  • All the Python you need - nothing you don't

About the author

Naomi Ceder is an elected fellow of the Python Software Foundation who has been learning, using, and teaching Python since 2001.


Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
Buy
MEAP combo $39.99 pBook + eBook
MEAP eBook $31.99 pdf + ePub + kindle

FREE domestic shipping on three or more pBooks