You are previewing Head First Python, 2nd Edition.
O'Reilly logo
Head First Python, 2nd Edition

Book Description

Want to learn the Python language without slogging your way through how-to manuals? With Head First Python, you’ll quickly grasp Python’s fundamentals, working with the built-in data structures and functions. Then you’ll move on to building your very own webapp, exploring database management, exception handling, and data wrangling. If you’re intrigued by what you can do with context managers, decorators, comprehensions, and generators, it’s all here. This second edition is a complete learning experience that will help you become a bonafide Python programmer in no time.

Table of Contents

  1. Dedication
  2. Special Upgrade Offer
  3. Praise for the first edition
    1. Praise for other Head First books
  4.  
  5. Author Of Head First Python, 2nd Edition
  6. How to use this Book: Intro
    1. Who Is This Book For?
      1. Who should probably back away from this book?
    2. We Know What You’re Thinking
      1. We know what your <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg" class="emphasis"><em>brain</em></span> is thinking is thinking
    3. Metacognition: Thinking About Thinking
    4. Here’s What WE Did:
    5. Here’s what YOU can do to bend your brain into submission
    6. Read Me, 1 of 2
    7. Read Me, 2 of 2
    8. The Technical Review Team
  7. Acknowledgments And Thanks
  8. Safari® Books Online
  9. 1. The Basics: Getting Started Quickly
    1. Breaking with Tradition
      1. Starting with a meatier example
    2. Jump Right In
      1. Python’s IDLE is all you need to get going
    3. Understanding IDLE’s Windows
    4. What Happens Next...
    5. Press F5 to Run Your Code
    6. Code Runs Immediately
    7. Executing Code, One Statement at a Time
      1. Let’s be the Python interpreter
    8. Functions + Modules = The Standard Library
    9. Batteries Included
    10. Data Structures Come Built-in
      1. Python variables are dynamically assigned
    11. Invoking Methods Obtains Results
      1. Invoking built-in module functionality
    12. Deciding When to Run Blocks of Code
    13. What Happened to My Curly Braces?
      1. A colon introduces an indented suite of code
    14. What “else” Can You Have with “if”?
    15. Suites Can Contain Embedded Suites
    16. What We Already Know
    17. Extending Our Program to Do More
      1. What We Need to do:
    18. What’s the Best Approach to Solving This Problem?
      1. Both approaches work with Python
    19. Returning to the Python Shell
    20. Experimenting at the Shell
    21. Iterating Over a Sequence of Objects
    22. Iterating a Specific Number of Times
    23. Applying the Outcome of Task #1 to Our Code
    24. Indent Suites with Format...Indent Region
    25. Arranging to Pause Execution
    26. Importation Confusion
    27. Generating Random Integers with Python
    28. Asking the Interpreter for Help
    29. Reviewing Our Experiments
    30. Updating What We Already Know
    31. A Few Lines of Code Do a Lot
    32. Coding a Serious Business Application
      1. Dealing with all that beer...
    33. Python Code Is Easy to Read
    34. Is Indentation Driving You Crazy?
      1. Getting back to the beer song code
    35. Asking the Interpreter for Help on a Function
      1. Starting, stopping, and stepping
    36. Experimenting with Ranges
    37. Don’t Forget to Try the Beer Song Code
      1. Wrapping up what you already know
      2. With all the beer gone, what’s next?
    38. Chapter 1’s Programs
  10. 2. List Data: Working With Ordered Data
    1. Numbers, Strings... and Objects
      1. Numbers
      2. Strings
      3. Objects
    2. “Everything is an Object”
      1. But... what Does all this Actually Mean?
    3. Meet the Four Built-in Data Structures
    4. Ordered Collections are Mutable/Immutable
    5. An Unordered Data Structure: Dictionary
    6. A Data Structure Which Avoids Duplicates: Set
      1. The 80/20 Data Structure Rule-of-Thumb
    7. A List is an Ordered Collection of Objects
      1. How to Spot a List in Code
    8. Creating Lists Literally
    9. Putting Lists to Work
      1. Working with Lists
      2. Is One Object Inside Another? Check with “in”
    10. Use Your Editor When Working on More Than a Few Lines of Code
      1. Don’t Forget: Press F5 to Run Your Program
    11. “Growing” A List At Run-Time
    12. Checking For Membership with “in”
      1. Is the Object “in” or “not in”?
    13. It’s Time to Update Our Code
    14. Removing Objects From a List
    15. Popping Objects Off a List
    16. Extending a List with Objects
    17. Inserting an Object Into a List
    18. What About Using Square Brackets?
    19. What Happened to “plist”?
    20. What Happened to “plist”, Continued?
    21. Lists: What We Know
    22. What Looks Like A Copy, Isn’t
    23. How To Copy A Data Structure
    24. Square Brackets Are Everywhere
      1. Lists: Updating What We Already Know
    25. Lists Extend The Square Bracket Notation
    26. Lists Understand Start, Stop, And Step
      1. You can put start, stop, and step inside square brackets
    27. List Slices In Action
    28. Starting, And Stopping With Lists
    29. Stepping With Lists
      1. Slices are everywhere
    30. Putting Slices To Work On Lists
      1. Converting “Don’t panic!” to “on tap”
    31. Putting Slices To Work On Lists, Continued
    32. Which is better? It depends...
    33. Slicing A List Is Non-destructive
      1. So... which is better?
    34. Python’s “for” Loop Understands Lists
      1. Understanding marvin.py’s code
    35. Python’s “for” Loop Understands Slices
    36. Marvin’s Slices In Detail
    37. Lists: Updating What We Know
    38. What’s Wrong With Lists?
    39. When Not To Use Lists
    40. Chapter 2’s Programs
    41. Chapter 2’s Programs, Continued
  11. 3. Structured Data: Working With Structured Data
    1. A Dictionary Stores Key/Value Pairs
    2. Make Dictionaries Easy to Read
    3. How to Spot a Dictionary in Code
      1. What happened to the insertion order?
    4. Insertion Order is NOT Maintained
      1. Dictionaries understand square brackets
    5. Value Lookup With Square Brackets
      1. Dictionary lookup is fast!
    6. Working With Dictionaries At Run-Time
    7. Recap: Displaying Found Vowels (Lists)
    8. How Can A Dictionary Help Here?
    9. Selecting A Frequency Count Data Structure
    10. Updating A Frequency Counter
    11. Updating A Frequency Counter, v2.0
    12. Iterating Over A Dictionary
    13. Iterating Over Keys And Values
    14. Dictionaries: What We Already Know
      1. Specifying the ordering of a dictionary on output
    15. Iterating Over A Dictionary With “items”
    16. Just How Dynamic Are Dictionaries?
      1. Dictionary keys must be initialized
    17. Avoiding KeyErrors At Run-Time
    18. Checking For Membership With “in”
    19. Ensuring Initialization Before Use
    20. Substituting “not in” For “in”
    21. Putting The “setdefault” Method To Work
      1. Dictionaries: updating what we already know
    22. Aren’t Dictionaries (And Lists) Enough?
    23. Sets Don’t Allow Duplicates
      1. Spotting sets in your code
    24. Creating Sets Efficiently
      1. Creating sets from sequences
    25. Taking Advantage Of Set Methods
    26. Union Works By Combining Sets
      1. What happened to the loop code?
    27. Difference Tells You What’s Not Shared
    28. Intersection Reports On Commonality
    29. Sets: What You Already Know
    30. Making The Case For Tuples
      1. How to spot a tuple in code
    31. Tuples Are Immutable
    32. Watch Out For Single-Object Tuples
    33. Combining The Built-in Data Structures
    34. Storing A Table Of Data
    35. A Dictionary Containing a Dictionary
    36. A Dictionary of Dictionaries (a.k.a. A Table)
    37. Pretty Printing Complex Data Structures
    38. Visualizing Complex Data Structures
    39. Accessing A Complex Data Structure’s Data
    40. Data Is As Complex As You Make It
    41. Chapter 3’s Programs (1 of 2)
    42. Chapter 3’s Programs (2 of 2)
  12. 4. Code Reuse: Functions & Modules
    1. Reusing Code With Functions
    2. Introducing Functions
    3. What About Type Information?
    4. Naming A Chunk Of Code With “def”
    5. Invoking Your Function
      1. Edit your function in an editor, not at the prompt
    6. Use IDLE’s Editor To Make Changes
    7. What’s The Deal With All Those Strings?
      1. Understanding the string quote characters
    8. Follow Best Practice As Per The PEPs
    9. Functions Can Accept Arguments
    10. Functions Return A Result
    11. Returning One Value
    12. Returning More Than One Value
      1. What’s the deal with “set()”?
    13. Recalling The Built-in Data Structures
    14. Use Annotations To Improve Your Docs
    15. Why Use Function Annotations?
    16. Functions: What We Know Already
    17. Making A Generically Useful Function
    18. Creating Another Function, 1 of 3
    19. Creating Another Function, 2 of 3
    20. Creating Another Function, 3 of 3
    21. Specifying Default Values For Arguments
    22. Positional vs. Keyword Assignment
    23. Updating What We Know About Functions
    24. Functions Beget Modules
      1. Creating modules couldn’t be easier, however...
    25. How Are Modules Found?
    26. Running Python From The Command-Line
    27. Not Found Modules Produce ImportErrors
    28. ImportErrors Occur No Matter The Platform
    29. Getting A Module Into Site-packages
      1. Using “setuptools” to install into site-packages
    30. Creating The Required Setup Files
    31. Creating The Distribution File
      1. Creating a distribution file on Windows
    32. Distribution Files On UNIX-like OSes
    33. Installing Packages With “pip”
      1. Step 3 on Windows
      2. Step 3 on UNIX-like OSes
    34. Modules: What We Know Already
      1. Giving your code away (a.k.a. sharing)
    35. Demonstrating Call-By-Value Semantics
    36. Demonstrating Call-By-Reference Semantics
    37. Can I Test For PEP 8 Compliance?
    38. Getting Ready To Check PEP 8 Compliance
      1. Recalling our code
      2. Installing pytest and the pep8 plug-in
    39. Install The Testing Developer Tools
    40. How PEP 8 Compliant Is Our Code?
    41. Understanding The Failure Messages
    42. Confirming PEP 8 Compliance
      1. Conformance to PEP 8 is a good thing
    43. Chapter 4’s Programs
  13. 5. Building a Webapp: Getting Real
    1. Python: What You Already Know
    2. Let’s Build Something
    3. What Do We Want Our Webapp To Do?
    4. What Happens On The Web Server?
      1. What do we need to get going?
    5. Let’s Install Flask
      1. Install Flask from the command-line with pip
    6. How Does Flask Work?
      1. Check that Flask is installed and working
      2. Run Flask from your OS command-line
    7. Running Your Flask Webapp For The First Time
    8. Here’s What Happened (Line-By-Line)
    9. Creating A Flask Webapp Object
    10. Decorating A Function With A URL
    11. Running Your Webapp’s Behavior(s)
    12. Exposing Functionality To The Web
    13. Recall What We’re Trying To Build
      1. Here’s the plan
    14. Building The HTML Form
      1. But... what if you’re new to all this HTML stuff?
      2. Create the HTML, then send it to the browser
    15. Templates Relate To Web Pages
    16. Rendering Templates From Flask
    17. Displaying The Webapp’s HTML Form
    18. Preparing To Run The Template Code
    19. We’re Ready For A Test-Run
    20. Understanding HTTP Status Codes
    21. Handling Posted Data
    22. Refining The Edit/Stop/Start/Test Cycle
    23. Accessing HTML Form Data With Flask
    24. Using Request Data In Your Webapp
      1. Automatic Reloads
    25. Producing The Results As HTML
    26. Calculating The Data We Need
    27. Adding A Finishing Touch
    28. Redirect To Avoid Unwanted Errors
    29. Functions Can Have Multiple URLs
    30. Updating What We Know
      1. Is that all there is to this chapter?
    31. Preparing Your Webapp For The Cloud
    32. Exploiting Dunder Name Dunder Main
      1. Deploying to PythonAnywhere (well... almost)
    33. Chapter 5’s Programs
  14. 6. Storing & Manipulating Data: Where To Put Your Data
    1. Doing Something With Your Webapp’s Data
    2. Python Supports Open, Process, Close
    3. Reading Data From An Existing File
    4. A Better Open, Process, Close: “with”
      1. The “with” statement manages context
      2. Invoking the logging function
    5. A Quick Review
      1. Take your webapp for a spin...
      2. Data is logged (behind the scenes)
    6. View The Log Through Your Webapp
      1. Where to start when things go wrong with your output
    7. Examine The Raw Data With View Source
    8. It’s Time To Escape (Your Data)
    9. Viewing The Entire Log In Your Webapp
    10. Learning More About The Request-object
      1. What’s all this, then?
    11. Logging Specific Web Request Attributes
    12. Log A Single Line Of Delimited Data
    13. One Final Change To Our Logging Code
    14. From Raw Data To Readable Output
    15. Does This Remind You Of Anything?
    16. Use A Dict Of Dicts... Or Something Else?
      1. Take a closer look at the logged data
    17. What’s Joined Together Can Be Split Apart
      1. Getting to a list of lists from a list of strings
    18. When Should The Conversion Occur?
    19. Processing Data: What We Already Know
      1. Take a closer look at the output
    20. Generate Readable Output With HTML
    21. Embed Display Logic In Your Template
    22. Producing Readable Output With Jinja2
    23. The Current State Of Our Webapp Code
    24. Asking Questions Of Your Data
    25. Chapter 6’s Code
  15. 7. Using a Database: Putting Python’s DB-API To Use
    1. Database-Enabling Your Webapp
    2. Task 1: Install The MySQL Server
    3. Introducing Python’s DB-API
    4. Task 2: Install A MySQL Database Driver For Python
    5. Install MySQL-Connector/Python
    6. Task 3: Create Our Webapp’s Database & Tables
    7. Decide On A Structure For Your Log Data
    8. Confirm Your Table Is Ready For Data
    9. Task 4: Create Code To Work With Our Webapp’s Database And Tables
    10. Storing Data Is Only Half The Battle
      1. This new function is a big change
    11. How Best To Reuse Your Database Code?
    12. Consider What You’re Trying To Reuse
    13. What About That Import?
      1. Be careful when positioning your import statements
    14. Consider What You’re Trying To Do
    15. You’ve Seen This Pattern Before
    16. The Bad News Isn’t Really All That Bad
    17. Chapter 7’s Code
  16. 8. A Little Bit of Class: Abstracting Behavior and State
    1. Hooking Into The “with” Statement
    2. An Object-Oriented Primer
      1. A class bundles behavior and state
      2. Classes have methods and attributes
    3. Creating Objects From Classes
    4. Objects Share Behavior But Not State
      1. Defining what we want CountFromBy to do
    5. Doing More With CountFromBy
    6. It’s Worth Repeating Ourselves: Objects Share Behavior But Not State
    7. Invoking A Method: Understand The Details
    8. Method Invocation: What Actually Happens
    9. Adding A Method To A Class
    10. Are You Serious About “self”?
    11. The Importance Of “self”
    12. Coping With Scoping
    13. Prefix Your Attribute Names With “self”
    14. Initialise (Attribute) Values Before Use
    15. Dunder Init Initializes Attributes
    16. Initializing Attributes With Dunder Init
      1. Pass any amount of argument data to dunder “init”
      2. What have we learned from this Test Drive?
    17. Understanding CountFromBy’s Representation
    18. Defining CountFromBy’s Representation
    19. Providing Sensible Defaults For CountFromBy
    20. Classes: What We Know
    21. Chapter 8’s Code
  17. 9. The Context Management Protocol: Hooking Into Python’s With Statement
    1. What’s The Best Way To Share Our Webapp’s Database Code?
    2. Consider What You’re Trying To Do, Revisited
      1. How best to create a context manager?
    3. Managing Context With Methods
      1. Dunder “enter” performs set-up
      2. Dunder “exit” does tear-down
      3. (As you know) dunder “init” initializes
    4. You’ve Already Seen A Context Manager In Action
      1. What’s required from you
    5. Create A New Context Manager Class
    6. Initialise The Class With The Database Config
      1. Your context manager begins to take shape
    7. Perform Set-up With Dunder Enter
      1. Don’t forget to prefix all attributes with “self”
    8. Perform Tear-down With Dunder Exit
      1. Your context manager is ready for testing
      2. There’s not much code here, is there?
    9. Reconsidering Your Webapp Code, 1 of 2
    10. Reconsidering Your Webapp Code, 2 of 2
    11. Recalling The “log_request” Function
    12. Amending The “log_request” Function
    13. Recalling The “view_the_log” Function
    14. It’s Not Just The Code That Changes
    15. Amending The “view_the_log” Function
      1. Here’s the SQL query you’ll need
      2. It’s nearly time for one last Test Drive
    16. All That Remains...
    17. Answering The Data Questions
      1. How many requests have been responded to?
      2. What’s the most common list of letters?
      3. Which IP addresses are the requests coming from?
      4. Which browser is being used the most?
    18. Chapter 9’s Code, 1 of 2
    19. Chapter 9’s Code, 2 of 2
  18. 10. Function Decorators: Wrapping Functions
    1. Your Webapp is Working well, but...
      1. Only Authenticated Users gain Access
    2. The Web is Stateless
      1. HTTP is to blame...
    3. Your Web Server (Not Your Computer) Runs Your Code
    4. It’s Time for a Bit of a Session
    5. Flask’s Session Technology Adds State
    6. Dictionary Lookup Retrieves State
      1. Time for a Test Drive?
    7. Managing Logins with Sessions
    8. Let’s do Login
      1. Amend the Webapp’s code to Handle Logins
    9. Let’s do Logout & Status Checking
      1. Amend the webapp’s code once more
    10. Why not Check for False?
    11. Can we now Restrict Access to URLs?
    12. Copy-and-Paste is Rarely a good Idea
      1. Put Shared Code into its Own Function
    13. Creating a function helps, but...
    14. You’ve been Using Decorators all Along
    15. Pass a Function to a Function
      1. Functions can take a Function as an Argument
    16. Invoking a Passed Function
    17. Functions can be Nested inside Functions
      1. When would you ever use this?
    18. Return a Function from a Function
    19. Accepting a list of Arguments
      1. Use * to accept an arbitrary list of arguments
    20. Processing a list of Arguments
      1. * Works on the way in, Too
    21. Accepting a dictionary of Arguments
      1. Use ** to accept arbitrary keyword arguments
    22. Processing a dictionary of Arguments
      1. ** Works on the way in, too
    23. Accepting any Number and type of Function Arguments
    24. A Recipe for Creating a Function Decorator
    25. Recap: We need to Restrict Access to Certain URLs
    26. Creating a Function Decorator
      1. That’s almost too easy, isn’t it?
      2. Can you see why the nested function is called “wrapper”?
    27. The Final Step: Handling Arguments
      1. We’re done... or are we?
    28. Your decorator in all its Glory
    29. Putting your decorator to Work
    30. The Beauty of Decorators
    31. Creating more Decorators
    32. Back to Restricting Access to /viewlog
    33. What’s Next?
    34. Chapter 10’s Code, 1 of 2
    35. Chapter 10’s Code, 2 of 2
  19. 11. Exception Handling: What to Do When Things Go Wrong
    1. Databases Aren’t Always Available
    2. Web Attacks Are A Real Pain
    3. Input-Output Is (Sometimes) Slow
    4. Your Function Calls Can Fail
    5. Considering The Identified Problems
      1. 1. Your database connection fails
      2. 2. Your application is subjected to an attack
      3. 3. Your code takes a long time to execute
      4. 4. Your function call fails
    6. Always Try To Execute Error-prone Code
    7. Catching An Error Is Not Enough
      1. There can be more than one exception raised...
    8. Try Once, But Except Many Times
    9. A Lot Of Things Can Go Wrong
    10. The Catch-All Exception-Handler
    11. Haven’t We Just Lost Something?
    12. Learning About Exceptions From “sys”
    13. The Catch-All Exception-Handler, Revisited
    14. Getting Back To Our Webapp Code
    15. Silently Handling Exceptions
    16. Handling Other Database Errors
    17. Does “More Errors” Mean “More Excepts”?
    18. Avoid Tightly Coupled Code
    19. The DBcm Module, Revisited
    20. Creating Custom Exceptions
      1. The Empty Class Isn’t Quite Empty...
    21. What Else Can Go Wrong With “DBcm”?
    22. Creating More Custom Exceptions
    23. Are Your Database Credentials Correct?
    24. Handling SQLError Is Different
    25. Be Careful With Code Positioning
    26. Raising SQLError
    27. A Quick Recap: Adding Robustness
      1. What happens if something takes a long time?
    28. How To Deal With Wait? It Depends...
    29. Chapter 11’s Code, 1 of 3
    30. Chapter 11’s Code, 2 of 3
    31. Chapter 11’s Code, 3 of 3
  20. 12. 11¾ A Little Bit of Threading: Dealing With Waiting
    1. Waiting: What To Do?
    2. How Are You Querying Your Database?
    3. Database Inserts And Selects Are Different
    4. Doing More Than One Thing At Once
      1. Concurrent code: you have options
    5. Don’t Get Bummed Out: Use Threads
    6. First Things First: Don’t Panic
    7. Don’t Get Bummed Out: Flask Can Help
    8. Is Your Webapp Robust Now?
    9. Chapter 11¾’s Code, 1 of 2
    10. Chapter 11¾’s Code, 2 of 2
  21. 13. Advanced Iteration: Looping Like Crazy
    1. Bahamas Buzzers Have Places To Go
    2. Reading CSV Data As Lists
    3. Reading CSV Data As Dictionaries
    4. Let’s Back Up A Little Bit
    5. Stripping, Then Splitting, Your Raw Data
    6. Be Careful When Chaining Method Calls
    7. Transforming Data Into The Format You Need
    8. Transforming Into A Dictionary Of Lists
      1. Think about the data wrangling that’s needed here...
    9. Let’s Do The Basic Conversions
    10. Did You Spot The Pattern In Your Code?
    11. Spotting The Pattern With Lists
    12. Converting Patterns Into Comprehensions
    13. Take A Closer Look At The Comprehension
    14. What’s The Big Deal?
      1. Comprehensions aren’t just for lists
    15. Specifying A Dictionary Comprehension
    16. Extend Comprehensions With Filters
    17. Recall What You Set Out To Do
    18. Deal With Complexity The Python Way
    19. Extract A Single Destination’s Flight Times
    20. Extract Flight Times For All Destinations
    21. That Feeling You Get...
    22. The Set Comprehension In Action
    23. How To Spot A Comprehension
    24. What About “Tuple Comprehensions”?
    25. Parentheses Around Code == Generator
      1. Generators produce data items one-at-a-time...
    26. Using A Listcomp To Process URLs
    27. Using A Generator To Process URLs
    28. Using A Generator: What Just Happened?
    29. Define What Your Function Needs To Do
    30. Yield To The Power Of Generator Functions
    31. Tracing Your Generator Function, 1 of 2
    32. Tracing Your Generator Function, 2 of 2
    33. Concluding Remarks
    34. One Final Question
    35. Chapter 12’s Code
    36. It’s Time To Go...
      1. You’re on your way!
  22. A. Installation: Installing Python
    1. Install Python 3 on Windows
      1. Download, then install
    2. Check Python 3 on Windows
      1. It’s Python 3 on Windows, sort of...
    3. Add to Python 3 on Windows
    4. Install Python 3 on Mac OS X (macOS)
      1. Using a package manager
    5. Check & Configure Python 3 on Mac OS X
      1. The Python 3 folder on Mac OS X
      2. You’re ready to run on Mac OS X
    6. Install Python 3 on Linux
  23. B. Pythonanywhere: Deploying Your Webapp
    1. Step 0: A Little Prep
    2. Step 1: Sign-up For PythonAnywhere
    3. Step 2: Upload Your Files To The Cloud
    4. Step 3: Extract And Install Your Code
    5. Step 4: Create A Starter Webapp, 1 of 2
    6. Step 4: Create A Starter Webapp, 2 of 2
    7. Step 5: Configure Your Webapp
    8. Step 5: Take Your Cloud-based Webapp For A Spin!
  24. C. Top Ten Things We Didn’t Cover: There’s Always More To Learn
    1. 1. What About Python 2?
    2. 2. Virtual Programming Environments
    3. 3. More On Object Orientation
    4. 4. Formats For Strings And The Like
    5. 5. Getting Things Sorted
    6. 6. More From The Standard Library
      1. Collections
      2. Itertools
      3. Functools
    7. 7. Running Your Code Concurrently
      1. New keywords: async and await
    8. 8. GUIs With Tkinter (And Fun With Turtles)
    9. 9. It’s Not Over ‘Til It’s Tested
    10. 10. Debug, Debug, Debug
  25. D. Top Ten Projects Not Covered: Even More Tools, Libraries, And Modules
    1. 1. Alternatives To >>>
    2. 2. Alternatives To IDLE
      1. What does Paul use?
    3. 3. Jupyter Notebook: The Web-Based IDE
    4. 4. Doing Data Science
    5. 5. Web Development Technologies
      1. But, wait, there’s more
    6. 6. Working With Web Data
      1. Scrape that web data!
    7. 7. More Data Sources
      1. There’s more to querying data than SQL
    8. 8. Programming Tools
      1. More help with testing, too
    9. 9. Kivy: Our Pick For “Coolest Project Ever”
    10. 10. Alternative Implementations
  26. E. Getting Involved: The Python Community
    1. BDFL: Benevolent Dictator For Life
      1. PSF: The Python Software Foundation
      2. PyCon: The Python Conference
    2. A Tolerant Community: Respect For Diversity
      1. Come for the language, stay for the community
    3. The Python Podcasts
      1. Python Newsletters
    4. The Zen Of Python
    5. Which Book Should I Read Next?
    6. Our Favorite Python Books
  27. F. Back Cover Content: TOC images
    1. What will you learn from this book?
    2. Why does this book look so different?
    3. Chapter 1 TOC Image
    4. Chapter 2 TOC Image
    5. Chapter 3 TOC Image
    6. Chapter 4 TOC Image
    7. Chapter 5 TOC Image
    8. Chapter 6 TOC Image
    9. Chapter 7 TOC Image
    10. Chapter 8 TOC Image
    11. Chapter 9 TOC Image
    12. Chapter 10 TOC Image
    13. Chapter 11 TOC Image
    14. Chapter 11¾ TOC Image
    15. Chapter 12 TOC Image
  28. About the Author
  29. Special Upgrade Offer
  30. Copyright