Of course! "Dive Into Python" is a classic, free, and highly-regarded resource for learning Python. It's particularly well-known for its practical, "learn by doing" approach.

Here’s a comprehensive guide to everything you need to know about "Dive Into Python," including how to get the PDF, its history, and how it fits into modern learning.
What is "Dive Into Python"?
"Dive Into Python" is a free Python book written by Mark Pilgrim. It was first published in 2004 and became an instant favorite for programmers who wanted to learn Python by building real, useful applications.
Key Philosophy:
- Practical, Not Theoretical: Instead of starting with abstract syntax, it dives straight into writing code that solves problems.
- "Dive In": The title is literal. You start coding on the very first page.
- Python 2 Focus: It's crucial to understand that the original book was written for Python 2. While the core concepts of programming are timeless, the syntax and libraries described are outdated for modern Python development.
How to Get the PDF
The book is officially free and available in several formats directly from the author's website.

Official Source (Recommended): You can find the book, along with HTML and other formats, on Mark Pilgrim's site:
Direct PDF Link: Here is a direct link to the PDF of the Python 2 version:
Note: The URL says "python3.net", but the content is the final version of the Python 2 book. The author planned a "Dive Into Python 3" but the original site for that is no longer available. This link is the most widely accessible version of the original text.
The Evolution: "Dive Into Python 3"
Mark Pilgrim did write a follow-up book, "Dive Into Python 3," which updated all the examples and explanations for Python 3. It was also released for free.

Where to Find "Dive Into Python 3":
- Official Archive: The book is archived on GitHub.
- Dive Into Python 3 on GitHub
You can find the PDF and other formats in the repository's releases section or by cloning the repo.
Is "Dive Into Python" Still Relevant in 2025? (The Big Question)
This is the most important part. The original "Dive Into Python" (for Python 2) is NOT a good starting point for new learners today.
Here’s a breakdown:
| Pros (Why it's still respected) | Cons (Why it's problematic for modern learners) |
|---|---|
| ✅ Excellent teaching style: The "learn by doing" approach is fantastic and timeless. | ❌ Completely Outdated Syntax: It teaches Python 2 syntax (e.g., print "hello", xrange, .iteritems()), which will not work in Python 3 and is considered bad practice. |
| ✅ Great for concepts: Core programming concepts (loops, functions, OOP) are explained well. | ❌ Obsolete Libraries: It uses libraries that have been replaced by modern, better alternatives (e.g., urllib2, ConfigParser). |
| ✅ Free and Accessible: It's a high-quality resource available at no cost. | ❌ Bad Habits: Learning Python 2 first can instill habits that you'll have to unlearn, making the transition to Python 3 harder. |
| ✅ Historical Significance: It's a great read to understand the history of the language. | ❌ No Modern Features: You'll miss out on crucial Python 3 features like f-strings, type hinting, async/await, and much cleaner iteration (for item in my_list). |
Verdict: Read it for its historical value or its excellent teaching style, but do not use it as your primary guide to learning modern Python.
Modern Alternatives to "Dive Into Python"
If you love the idea of a comprehensive, free, "learn by building" book, here are some excellent modern alternatives for Python 3.
For Beginners
-
Automate the Boring Stuff with Python by Al Sweigart
- Best for: Absolute beginners, office workers, anyone who wants to solve practical problems quickly.
- Why it's great: It's the modern spiritual successor to "Dive Into Python." It's free, project-based, and focuses on using Python for real-world tasks like manipulating files, sending emails, and scraping web data. It uses Python 3 exclusively.
-
Python for Everybody (Py4E) by Dr. Charles Severance
- Best for: True beginners with little to no programming experience.
- Why it's great: Extremely gentle and well-structured. It's designed as a university course but is available for free online. It comes with video lectures and quizzes.
-
A Byte of Python by Swaroop C H
- Best for: Beginners who prefer a more traditional, structured textbook approach.
- Why it's great: Clear, concise, and covers all the fundamentals. It's available in many languages and is updated for Python 3.
For Programmers with Experience
-
Fluent Python by Luciano Ramalho
- Best for: Programmers who already know another language and want to master "Pythonic" code.
- Why it's great: It goes beyond syntax and teaches you the why behind Python's design. It's the book to read after you've learned the basics.
-
Effective Python by Brett Slatkin
- Best for: Developers who want to write more professional, efficient, and maintainable Python code.
- Why it's great: It's a collection of 90 specific ways to improve your Python code, based on best practices and common pitfalls.
Summary
| Resource | Best For | Key Feature |
|---|---|---|
| Dive Into Python (PDF) | Historians, fans of Mark Pilgrim's style. | The original "learn by doing" classic. (Python 2) |
| Automate the Boring Stuff | Beginners (Modern Choice) | Practical, project-based, Python 3. |
| Python for Everybody | True beginners, self-learners. | Gentle, structured, with videos. (Python 3) |
| Fluent Python | Experienced Programmers | Mastering "Pythonic" idioms and advanced features. (Python 3) |
| Effective Python | Developers | Writing professional, high-quality code. (Python 3) |
Recommendation: Skip the original "Dive Into Python" for learning and start with Automate the Boring Stuff with Python. It captures the same spirit of practical, hands-on learning but is fully up-to-date for Python 3.
