O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learn More Python 3 the Hard Way: The Next Step for New Python Programmers

Book Description

Transform Your Ideas into High-Quality Python Code!

Zed Shaw has perfected the world’s best system for becoming a truly effective Python 3. developer. Follow it and you will succeed—just like the tens of millions of programmers he’s already taught. You bring the discipline, commitment, and persistence; the author supplies everything else.

In Learn Python 3 the Hard Way, Zed Shaw taught you the basics of Programming with Python 3. Now, in Learn More Python 3 the Hard Way, you’ll go far beyond the basics by working through 5 brilliantly crafted projects. Each one helps you build a key practical skill, combining demos to get you started and challenges to deepen your understanding. Zed then teaches you even more in hours of online videos, where he shows you how to break, fi, and debug your code.

First, you’ll discover how to analyze a concept, idea, or problem to implement in software. Then, step by step, you’ll learn to design solutions based on your analyses and implement them as simply and elegantly as possible. Throughout, Shaw stresses process so you can get started and build momentum, creativity to solve new problems, and quality so you’ll build code people can rely on.

  • Manage comple projects with a programmer’s tet editor

  • Leverage the immense power of data structures

  • Apply algorithms to process your data structures

  • Master indispensable tet parsing and processing techniques

  • Use SQL to efficiently and logically model stored data

  • Learn powerful command-line tools and skills

  • Combine multiple practices in complete projects

It’ll be hard at first. But soon, you’ll just get it—and that will feel great!

This course will reward you for every minute you put into it. Soon, you’ll go beyond merely writing code that runs: you’ll craft high-quality Python code that solves real problems. You’ll be a serious Python programmer.

Perfect for Everyone Who’s Already Started Working with Python, including Junior Developers and Seasoned Python Programmers Upgrading to Python 3.+

Register your product at informit.com/register for convenient access to downloads, updates, and/or corrections as they become available.

Table of Contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Contents
  5. Preface
    1. It’s All Personal
    2. Using the Included Videos
  6. PART I Initial Knowledge
    1. What If I Hate Your Stupid Personal Process Zed?
    2. What If I Find Out I’m Terrible?
  7. Exercise 0 The Setup
    1. A Programmer’s Editor
    2. Python 3.6
    3. A Working Terminal
    4. A Working pip+virtualenv Configuration
    5. Lab Journal
    6. A Github.com Account
    7. git
    8. Optional: Screen-Recording Software
    9. Further Study
  8. Exercise 1 On Process
    1. Exercise Challenge
    2. Study Drills
    3. Further Study
  9. Exercise 2 On Creativity
    1. Exercise Challenge
    2. Study Drill
  10. Exercise 3 On Quality
    1. Exercise Challenge
    2. Study Drill
  11. PART II Quick Hacks
    1. How to Practice Creativity
    2. A Process for Early Coders
    3. An Early Coder’s Coding Process
  12. Exercise 4 Dealing with Command Line Arguments
    1. Exercise Challenge
    2. Solution
    3. Study Drills
  13. Exercise 5 cat
    1. Exercise Challenge
    2. Solution
    3. Study Drills
    4. Further Study
  14. Exercise 6 find
    1. Exercise Challenge
    2. Study Drills
    3. Further Study
  15. Exercise 7 grep
    1. Exercise Challenge
    2. Study Drills
    3. Further Study
  16. Exercise 8 cut
    1. Exercise Challenge
    2. Study Drill
    3. Further Study
  17. Exercise 9 sed
    1. Exercise Challenge
    2. Study Drills
    3. Further Study
  18. Exercise 10 sort
    1. Exercise Challenge
    2. Study Drills
    3. Further Study
  19. Exercise 11 uniq
    1. Exercise Challenge
    2. Study Drills
    3. Further Study
  20. Exercise 12 Review
    1. Exercise Challenge
    2. Study Drills
    3. Further Study
  21. PART III Data Structures
    1. Learning Quality through Data Structures
    2. How to Study Data Structures
  22. Exercise 13 Single Linked Lists
    1. Description
    2. Controller
    3. Test
    4. Introductory Auditing
    5. Exercise Challenge
    6. Auditing
    7. Study Drill
  23. Exercise 14 Double Linked Lists
    1. Introducing Invariant Conditions
    2. Exercise Challenge
    3. Study Drill
  24. Exercise 15 Stacks and Queues
    1. Exercise Challenge
    2. Breaking It
    3. Further Study
  25. Exercise 16 Bubble, Quick, and Merge Sort
    1. Exercise Challenge
    2. Study Bubble Sort
    3. Merge Sort
    4. Merge Sort Cheat Mode
    5. Quick Sort
    6. Study Drills
  26. Exercise 17 Dictionary
    1. Exercise Challenge
    2. Doing a “Code Master Copy”
    3. Copy the Code
    4. Annotate the Code
    5. Summarize the Data Structure
    6. Memorize the Summary
    7. Implement from Memory
    8. Repeat
    9. Study Drills
    10. Break It
  27. Exercise 18 Measuring Performance
    1. The Tools
    2. timeit
    3. cProfile and profile
    4. Analyzing Performance
    5. Exercise Challenge
    6. Study Drills
    7. Breaking It
    8. Further Study
  28. Exercise 19 Improving Performance
    1. Exercise Challenge
    2. Further Study
  29. Exercise 20 Binary Search Trees
    1. BSTree Requirements
    2. Deleting
    3. Exercise Challenge
    4. Study Drills
  30. Exercise 21 Binary Search
    1. Exercise Challenge
    2. Study Drills
    3. Further Study
  31. Exercise 22 Suffix Arrays
    1. Exercise Challenge
    2. Study Drills
    3. Further Study
  32. Exercise 23 Ternary Search Trees
    1. Exercise Challenge
    2. Study Drills
  33. Exercise 24 Fast URL Search
    1. Exercise Challenge
    2. Study Drills
    3. Further Study
  34. PART IV Intermediate Projects
    1. Tracking Your Defects
  35. Exercise 25 xargs
    1. Exercise Challenge
    2. Study Drills
  36. Exercise 26 hexdump
    1. Exercise Challenge
    2. Study Drill
    3. Further Study
  37. Exercise 27 tr
    1. Exercise Challenge
    2. A Criticism of 45-Minute Blocks
    3. Study Drills
  38. Exercise 28 sh
    1. Exercise Challenge
    2. Study Drill
    3. Further Study
  39. Exercise 29 diff and patch
    1. Exercise Challenge
    2. Study Drill
    3. Further Study
  40. PART V Parsing Text
    1. Introducing Code Coverage
  41. Exercise 30 Finite State Machines
    1. Exercise Challenge
    2. Study Drills
    3. Further Study
  42. Exercise 31 Regular Expressions
    1. Exercise Challenge
    2. Study Drills
    3. Further Study
  43. Exercise 32 Scanners
    1. Puny Python Scanner
    2. Exercise Challenge
    3. Study Drills
    4. Further Study
  44. Exercise 33 Parsers
    1. Recursive Descent Parsing
    2. BNF Grammars
    3. Quick Demo Hack Parser
    4. Exercise Challenge
    5. Study Drill
    6. Further Study
  45. Exercise 34 Analyzers
    1. Visitor Pattern
    2. A Short Puny Python Analyzer
    3. Parser versus Analyzer
    4. Exercise Challenge
    5. Study Drills
    6. Further Study
  46. Exercise 35 Interpreters
    1. Interpreters versus Compilers
    2. Python Is Both
    3. How to Write an Interpreter
    4. Exercise Challenge
    5. Study Drills
    6. Further Study
  47. Exercise 36 Simple Calculator
    1. Exercise Challenge
    2. Study Drills
    3. Further Study
  48. Exercise 37 Little BASIC
    1. Exercise Challenge
    2. Study Drills
  49. PART VI SQL and Object Relational Mapping
    1. Understanding SQL Is Understanding Tables
    2. What You’ll Learn
  50. Exercise 38 Introduction to SQL
    1. What Is SQL?
    2. The Setup
    3. Learning SQL Vocabulary
    4. SQL Grammar
    5. Further Study
  51. Exercise 39 Creating with SQL
    1. Creating Tables
    2. Creating a Multi-table Database
    3. Inserting Data
    4. Insert Referential Data
    5. Exercise Challenge
    6. Further Study
  52. Exercise 40 Reading with SQL
    1. Select across Many Tables
    2. Exercise Challenge
    3. Further Study
  53. Exercise 41 Updating with SQL
    1. Updating Complex Data
    2. Replacing Data
    3. Exercise Challenge
    4. Further Study
  54. Exercise 42 Deleting with SQL
    1. Deleting Using Other Tables
    2. Exercise Challenge
    3. Further Study
  55. Exercise 43 SQL Administration
    1. Destroying and Altering Tables
    2. Migrating and Evolving Data
    3. Exercise Challenge
    4. Further Study
  56. Exercise 44 Using Python’s Database API
    1. Learning an API
    2. Exercise Challenge
    3. Further Study
  57. Exercise 45 Creating an ORM
    1. Exercise Challenge
    2. Further Study
  58. PART VII Final Projects
    1. What Is Your Process?
  59. Exercise 46 blog
    1. Exercise Challenge
    2. Study Drills
  60. Exercise 47 bc
    1. Exercise Challenge
    2. Study Drill
  61. Exercise 48 ed
    1. Exercise Challenge
    2. Study Drills
  62. Exercise 49 sed
    1. Exercise Challenge
    2. Study Drill
  63. Exercise 50 vi
    1. Exercise Challenge
    2. Study Drills
  64. Exercise 51 lessweb
    1. Exercise Challenge
    2. Breaking It
    3. Study Drills
  65. Exercise 52 moreweb
    1. Exercise Challenge
    2. Breaking It
    3. Further Study
  66. Index