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.

Why does this book look so different? Based on the latest research in cognitive science and learning theory, Head First Pythonuses a visually rich format to engage your mind, rather than a text-heavy approach that puts you to sleep. Why waste your time struggling with new concepts? This multi-sensory learning experience is designed for the way your brain really works.

Publisher resources

View/Submit Errata

Table of contents

  1. Dedication
  2. Advance Praise for Head First Python, Second Edition
    1. Praise for the first edition
    2. Praise for other Head First books
    3. Praise for other Head First books
  4. Author of Head First Python, 2nd Edition
  5. 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 brain 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
    9. Acknowledgments and Thanks
  6. O’Reilly Safari
  7. 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 Code
  8. 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 That 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 Runtime
    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. Lists: What We Know
    21. What Looks Like a Copy, But Isn’t
    22. How to Copy a Data Structure
    23. Square Brackets Are Everywhere
      1. Lists: Updating What We Already Know
    24. Lists Extend the Square Bracket Notation
    25. Lists Understand Start, Stop, and Step
      1. You can put start, stop, and step inside square brackets
    26. List Slices in Action
    27. Starting and Stopping with Lists
    28. Stepping with Lists
      1. Slices are everywhere
    29. Putting Slices to Work on Lists
      1. Converting “Don’t panic!” to “on tap”
    30. Putting Slices to Work on Lists, Continued
    31. Which Is Better? It Depends...
    32. Slicing a List Is Nondestructive
      1. So...which is better?
    33. Python’s “for” Loop Understands Lists
      1. Understanding marvin.py’s code
    34. Python’s “for” Loop Understands Slices
    35. Marvin’s Slices in Detail
    36. Lists: Updating What We Know
    37. What’s Wrong with Lists?
    38. When Not to Use Lists
    39. Chapter 2’s Code, 1 of 2
    40. Chapter 2’s Code, 2 of 2
  9. 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 Runtime
    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 Runtime
    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
      1. Using a set was the perfect choice here...
    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 Code, 1 of 2
    42. Chapter 3’s Code, 2 of 2
  10. 4. Code Reuse: Functions and 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 Versus 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 Code
  11. 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 Functionalit y 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 Code
  12. 6. Storing and 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
  13. 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 and 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
  14. 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. Initialize (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
  15. 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 setup
      2. Dunder “exit” does teardown
      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. Initialize the Class with the Database Config
      1. Your context manager begins to take shape
    7. Perform Setup with Dunder “enter”
      1. Don’t forget to prefix all attributes with “self”
    8. Perform Teardown with Dunder “exit”
      1. Your context manager is re ady 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?
    18. Which IP addresses are the requests coming from?
    19. Which browser is being used the most?
    20. Chapter 9’s Code, 1 of 2
    21. Chapter 9’s Code, 2 of 2
  16. 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 and 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
  17. 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
      1. The Catch-All Exception Handler
    10. Haven’t We Just Lost Something?
    11. Learning About Exceptions from “sys”
    12. The Catch-All Exception Handler, Revisited
    13. Getting Back to Our Webapp Code
    14. Silently Handling Exceptions
    15. Handling Other Database Errors
    16. Does “More Errors” Mean “More excepts”?
    17. Avoid Tightly Coupled Code
    18. The DBcm Module, Revisited
    19. Creating Custom Exceptions
    20. 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 an 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
  18. 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
  19. 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!
  20. 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 and 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
  21. 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 6: Take Your Cloud-Based Webapp for a Spin!
  22. 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 w ith Tkinter (and Fun w ith Turtles)
    9. 9. It’s Not Over ’Til It’s Tested
    10. 10. Debug, Debug, Debug
  23. 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
  24. E. Getting Involved: The Python Community
    1. BDFL: Benevolent Dictator for Life
      1. PSF: The Python Sof t ware Foundation
      2. PyCon: The Python Conference
    2. A Tolerant Community: Respect for Diversit
      1. Come for the language, stay for the community
    3. Python Podcasts
      1. Python Newsletters
    4. The Zen of Python
    5. Which Book Should I Read Next?
    6. Our Favorite Python Books
  25. Index
  26. About the Author
  27. Copyright

Product information

  • Title: Head First Python, 2nd Edition
  • Author(s): Paul Barry
  • Release date: November 2016
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781491919538