Learning python 5th edition fifth edition
Get a comprehensive, in-depth introduction to the core Python language with this hands-on book. Based on author Mark Lutz’s popular training course, this updated fifth edition will help you quickly write efficient, high-quality code with Python. It’s an ideal way to begin, whether you’re new to programming or a professional developer versed in other languages.
Complete with quizzes, exercises, and helpful illustrations, this easy-to-follow, self-paced tutorial gets you started with both Python 2.7 and 3.3— the latest releases in the 3.X and 2.X lines—plus all other releases in common use today. You’ll also learn some advanced language features that recently have become more common in Python code.
- Explore Python’s major built-in object types such as numbers, lists, and dictionaries
- Create and process objects with Python statements, and learn Python’s general syntax model
- Use functions to avoid code redundancy and package code for reuse
- Organize statements, functions, and other tools into larger components with modules
- Dive into classes: Python’s object-oriented programming tool for structuring code
- Write large programs with Python’s exception-handling model and development tools
- Learn advanced Python tools, including decorators, descriptors, metaclasses, and Unicode processing
See 1 Author Credential
The author Mark Lutz has the following credentials.
About Learning Python, 5th Edition
[November 2017] Due to temporary inventory issues, the print version of this book is currently out of stock at Amazon, but should be available again in late November (more). [June 2013] I’m pleased to announce the release of the 5th Edition of the book Learning Python—the most comprehensive version of this classic and foundational Python language tutorial.This new edition, designed for all Python learners in all Python domains, has been brought thoroughly up-to-date with Python 3.3 and 2.7, and expanded substantially to reflect current practice in the Python world. Like its previous editions, this book also applies to all other Python releases in common use today. Whether you’re using 3.X, 2.X, or both, you’ll find this new edition tailored to your current and future needs.
Among other language extensions, this edition incorporates Python 3.3’s namespace packages and Windows launcher, as well as 2.7’s adoption of 3.X features such as set and dictionary comprehensions. In addition, this version has grown more 2.X compatible, and has been augmented with enhanced coverage of tools such as super(), descriptors, the MRO, and metaclasses, which have grown more pervasive in today’s Python code.
As always, this book is designed to be an in-depth introduction to the core Python language, and work much like a self-paced class on Python fundamentals. With quizzes, exercises, and solutions, its material embodies nearly two decades of live Python training experience and feedback from real Python learners like you. There’s more on this book’s content and scope in the Previews below and its main title page.
Learning Python, 5th Edition is available in print, ebook, and online forms from all the usual places, including Amazon and O’Reilly. For purchase options and links, please see the Purchase pointers page. FAQ : there are no plans for a new edition, as noted below.
Resources
- The publisher’s catalog page: details and TOC
- The book’s example code: zipped, unzipped, how-to
- The book’s official errata page: edits and updates
More Resources
- Python changes after this edition’s publication
- Assorted reader queries on common topics
- Extra program examples for book readers to explore
- This book’s backstory on the Teaching Python page
- Links to resources for all five editions of this book
- O’Reilly sampler: Chapter 1, A Python Q&A Session, plus the full TOC
- More on this edition’s changes: a final draft excerpt from its Preface
- New coverage: a brief look at Python’s new-style inheritance (also here)
Contents
In brief, this edition’s main parts reflect major language topics:
For more details, check out the Preface excerpt, or the full Table of Contents in the O’Reilly sampler.
Example Programs
There are hundreds of examples in this text. Some are short code segments typed and run at the Python interactive prompt, and others are larger scripts or modules coded and run in files. Although typing code manually is an important part of the learning process, the book’s larger examples can also be fetched both here and here.
Related Books
- For a reference companion to this book, see also the book Python Pocket Reference This book provides supplemental reference-only material, and is intended to serve as an extension to Learning Python . It’s current 5th Edition has been updated to match the language coverage in the latest Learning Python .
- In addition, the applications-focused book Programming Python is designed to be a follow-up to Learning Python . It covers what you can do with Python after you’ve mastered its language fundamentals. As a tutorial that moves on to explore common libraries and tools and present more complete example programs, Programming Python serves as the second of a two-book set.
These two related books are not required reading, and some readers may opt to instead focus on specific application domains after finishing Learning Python ‘s fundamentals coverage. For those looking for extra resources, though, they are suggested texts.
Recent Notes
This book mentions using Python on the Android and iOS mobile platforms in passing, but it is now entirely feasible to work though the book’s examples and exercises on your smartphone. On Android, for example, the Termux app provides a full-featured Linux environment for running code in a console; the Pydroid 3 and QPython apps allow you to run Python code in GUI IDEs; and programmer-friendly keyboards may help. iOS also has multiple Python options, including Pythonista.
For more on using Python on Android, check out this site’s related documents here and here; they focus on running Python tkinter GUIs on Android (also possible today), but cover general Android topics along the way. Of course, phones are not everyone’s idea of coding-friendly tools, but these devices are becoming powerful enough to double as general-purpose computers, especially when paired with keyboards, mice, and styli.
(Jun-2018) More Temporary Inventory Outages
This book went out of stock again at Amazon in May-June 2018, despite ongoing all-time-high demand. As this note is being written, the outage has lasted for six weeks, but the publisher has 3,500 new units on the way, and will be printing another 5,000 almost immediately. This will hopefully suffice while the logistics story is improved over the next few months, but see the Nov-2017 note below for more pointers.
(Nov-2017) Temporary Inventory Outages
- Existing reports made from copies printed prior to Aug-2016 are relevant to older printings only, because older errata have been fixed in newer printings. Page numbers are still valid for the older printings, and need no mapping to newer printings.
- New reports made from copies printed prior to Aug-2016 are applicable to both older and newer printings, but page numbers won’t be valid for newer printings.
- New reports made from copies printed on or after Aug-2016 are applicable to both older and newer printings, but page numbers won’t be valid for older printings.
To address both of the last two points, any new errata reports will include page numbers for both newer and older printings. On the upside, the impact of this change is expected to be negligible, as most errata have already been caught and fixed at the 3-year point in this edition’s history; thanks to all who took time to note the typos.
(Jun-2016) About Future Editions
There are currently no plans for a new edition of this book. As of June 2016, the 5th Edition is just 3 years old. It provides in-depth coverage of language and programming fundamentals that span all Python versions—past, present, and future—and remains fully relevant to all Python programmers and applications today. Moreover, because its content has chronicled two decades of Python’s history, this classic text also provides context important for understanding Python’s current state.
Given the constant change of Python’s development, readers should expect to supplement any learning resource with documentation on recent Python releases. For more on new editions, see this page. For more on post-publication Python changes, see the survey on this site, and Python’s What’s New docs.
(May-2016) About Other «Learning Python»s
Packt Publishing released a book also titled «Learning Python» in December 2015. I have nothing to do with this other book, and it is in no way associated with my book. This other book seems very different from my two-decade work, but its title is a clear infringement of a trademark owned by my publisher.
Unfortunately, my publisher opted to do nothing about the infringement, and instead confusingly sells the other book, and even promotes it instead of mine. Given the amount of time and resources spent on developing my book, this seems a bizarre business model, and makes about as much sense as Apple advertising a competitor’s «iPhone.» As always, please use discretion when purchasing texts—even on my own publisher’s website!