
Enjoy fast, free delivery, exclusive deals, and award-winning movies & TV shows with Prime
Try Prime
and start saving today with fast, free delivery
Amazon Prime includes:
Fast, FREE Delivery is available to Prime members. To join, select "Try Amazon Prime and start saving today with Fast, FREE Delivery" below the Add to Cart button.
Amazon Prime members enjoy:- Cardmembers earn 5% Back at Amazon.com with a Prime Credit Card.
- Unlimited Free Two-Day Delivery
- Streaming of thousands of movies and TV shows with limited ads on Prime Video.
- A Kindle book to borrow for free each month - with no due dates
- Listen to over 2 million songs and hundreds of playlists
- Unlimited photo storage with anywhere access
Important: Your credit card will NOT be charged when you start your free trial or if you cancel during the trial period. If you're happy with Amazon Prime, do nothing. At the end of the free trial, your membership will automatically upgrade to a monthly membership.
Buy new:
-46% $54.28$54.28
Ships from: Amazon.com Sold by: Amazon.com
Save with Used - Good
$48.75$48.75
Ships from: Amazon Sold by: JRL33 Enterprises
Return this item for free
We offer easy, convenient returns with at least one free return option: no shipping charges. All returns must comply with our returns policy.
Learn more about free returns.- Go to your orders and start the return
- Select your preferred free shipping option
- Drop off and leave!

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
Python Algorithms: Mastering Basic Algorithms in the Python Language 2nd ed. Edition
Purchase options and add-ons
Python Algorithms, Second Edition explains the Python approach to algorithm analysis and design. Written by Magnus Lie Hetland, author of Beginning Python, this book is sharply focused on classical algorithms, but it also gives a solid understanding of fundamental algorithmic problem-solving techniques.
The book deals with some of the most important and challenging areas of programming and computer science in a highly readable manner. It covers both algorithmic theory and programming practice, demonstrating how theory is reflected in real Python programs. Well-known algorithms and data structures that are built into the Python language are explained, and the user is shown how to implement and evaluate others.
- ISBN-10148420056X
- ISBN-13978-1484200568
- Edition2nd ed.
- Publication dateSeptember 4, 2014
- LanguageEnglish
- Dimensions7.52 x 0.73 x 9.25 inches
- Print length336 pages
There is a newer edition of this item:
Frequently bought together

Customers who viewed this item also viewed
Editorial Reviews
Review
“The book is structured as probably any book or course for programming. Starting from the basics with the Asymptotic Notation and the complexity of algorithms and going to various structures and cases. After each chapter you have problems with hints for their resolution at the end of the book. … If you know Python already to some good working level and you need to understand algorithms for a reason, the book would bring you there.” (Vitosh Academy, vitoshacademy.com, October, 2015)
About the Author
Product details
- Publisher : Apress; 2nd ed. edition (September 4, 2014)
- Language : English
- Paperback : 336 pages
- ISBN-10 : 148420056X
- ISBN-13 : 978-1484200568
- Item Weight : 1.25 pounds
- Dimensions : 7.52 x 0.73 x 9.25 inches
- Best Sellers Rank: #2,034,455 in Books (See Top 100 in Books)
- #406 in Mathematical & Statistical Software
- #1,635 in Python Programming
- #2,099 in Software Development (Books)
- Customer Reviews:
About the author

Discover more of the author’s books, see similar authors, read book recommendations and more.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonTop reviews from the United States
There was a problem filtering reviews. Please reload the page.
- Reviewed in the United States on May 7, 2020The author does a better job of explaining algorithms than the vast majority of well-known books out there. The author approaches algorithms in plain English, and actually explains concepts in a way that is easy to absorb and understand. This is a great read if you are learning algorithms for the first time, especially if you use python. Well worth the money and glad to have come across this book.
- Reviewed in the United States on February 18, 2016Was impressed by the quality and clarity of the material. The title says it all - it covers exactly what it says. Code is clean/pythonic. You will not be disappointed
- Reviewed in the United States on July 7, 2019This is a good python algorithm book for beginners.
- Reviewed in the United States on June 12, 2015Excellent book
- Reviewed in the United States on October 11, 2015<disclaimer>I am a blogger, writing articles for various programming languages, that I find interesting. Lately for Python. I was provided with a paper version of the book from Apress, after a request from my site.</disclaimer>
Before starting the review, let me clarify where I stay in the position of Algorithms - I have been a student at an algorithm course in HackBulgaria with Python and I have read some chapters from Algorithm Design (Kleinberg & Trados) and The Algorithm Design (from Skiena). Furthermore, sometimes I take part in algorithmic competitions, but I am not amongst the top coders.
Having said all of this, let me start with the review:
Structure> The book is structured as probably any book or course for programming. Starting from the basics with the Asymptotic Notation and the complexity of algorithms and going to various structures and cases. After each chapter you have problems with hints for their resolution at the end of the book. Three appendices - way to speed up python, list of all algorithmic problems and graph terminology. I found them useful.
Positive points> As the book of Kleinberg and Trados, here the author really tries to tell a story about the algorithm and he manages it pretty well. Probably by experience he has realized that it is quite easy to "lose" the reader on the tough parts, thus there are some pictures and jokes. Definitely something that I liked.
Negative points (a.k.a. hate)> The only hate part I can think about is that the exercises are not completely resolved, but only hints are given for them. Anyway, for an average programmer having access to google and stackoverflow, it should not be difficult to solve those with the hints. But still, I prefer to know the authors ideas of how to solve those. The more code you see, the better you write your own.
Code Present> Yes. Totally. And that is great! :) Something good about the code - whenever the code allows it, the author provides in a comment an example of what should be written in the shell to run the code. That is a good practise more authors should follow, so the readers are never confused. That is an example of the commented code:
"""
>>> G = some_graph()
>>> list(iddfs(G, 0))
[0, 1, 2, 3, 4, 5, 6, 7]
"""
Style of writing> A nice one. As readable as I could imagine. With jokes, trying to attract the attention to the subject. Telling the stories behind some of the famous algorithms is also part of the book - e.g. the thing with the Swedish towns and villages, the bridges of Kaliningrad. Even when there is no such story, the author creates one, which I liked.
The Verdict> If you know Python already to some good working level and you need to understand algorithms for a reason, the book would bring you there. If you do not know Python, learn it first and then go into this book. :)
- Reviewed in the United States on July 7, 2021Good as expected
Top reviews from other countries
- VicenteReviewed in the United Kingdom on April 25, 2017
3.0 out of 5 stars Not recommended.
Its a bit complicated and poor in content for the price.
It is more a complement than a all in one thing.
The explanations are a bit here and there. Not easy to understand.
Maybe have other good books more complete than this one.
- CooperReviewed in Japan on October 31, 2019
5.0 out of 5 stars Great for intermediate coder looking to level up
I give it a perfect score because it fits my expectations perfectly. I would say that I have an intermediate coding ability. I have mostly avoided algorithms because of my desire to just pound away at the keyboard and “make stuff” but I quickly reached a point where I needed to really dig down into the algorithms if I wanted to be able to take on more complicated problems. The material in this book is hard enough to keep me growing but not bloated with the really high academic stuff that makes my head spin. With this I feel like I’m will level up.