FREE Delivery in the UK.
In stock.
Dispatched from and sold by Amazon. Gift-wrap available.
Python Algorithms: Master... has been added to your Basket
+ £2.80 UK delivery
Used: Very Good | Details
Sold by Nearfine
Condition: Used: Very Good
Comment: Gently used. Expect delivery in 2-3 weeks.
Have one to sell?
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See all 3 images

Python Algorithms: Mastering Basic Algorithms in the Python Language (Expert's Voice in Open Source) Paperback – 24 Nov 2010

Save an extra 10% with Amazon Student*

5.0 out of 5 stars 1 customer review

See all formats and editions Hide other formats and editions
Amazon Price
New from Used from
Kindle Edition
"Please retry"
"Please retry"
£36.57 £25.22
Promotion Message Amazon Students Members Get 10% Off 2 Promotion(s)

There is a newer edition of this item:

*Save an extra 10% on this product with Amazon Student
From 28 June, 2016, Amazon Student members will receive an extra 10% off 1000s of selected books. The Offer will be automatically applied to your order at checkout. This Offer ends at 23:59pm BST on 16 October, 2016. Terms & Conditions apply. Learn more
£39.50 FREE Delivery in the UK. In stock. Dispatched from and sold by Amazon. Gift-wrap available.
click to open popover

Special Offers and Product Promotions

  • Amazon Students Members Get an Extra 10% Off Selected Books Here's how (terms and conditions apply)
  • Save 10% on Books for Schools offered by when you purchase 10 or more of the same book. Here's how (terms and conditions apply) Enter code SCHOOLS2016 at checkout. Here's how (terms and conditions apply)

Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

  • Apple
  • Android
  • Windows Phone

To get the free app, enter your mobile phone number.

Product details

  • Paperback: 336 pages
  • Publisher: Apress; 1st ed. edition (24 Nov. 2010)
  • Language: English
  • ISBN-10: 1430232374
  • ISBN-13: 978-1430232377
  • Product Dimensions: 21.6 x 1.9 x 26 cm
  • Average Customer Review: 5.0 out of 5 stars  See all reviews (1 customer review)
  • Amazon Bestsellers Rank: 1,061,547 in Books (See Top 100 in Books)
  • See Complete Table of Contents

Product Description

About the Author

Magnus Lie Hetland is an experienced Python programmer, having used the language since the late 1990s. He is also an associate professor of algorithms at the Norwegian University of Science and Technology, having taught algorithms for the better part of a decade. Hetland is the author of Practical Python and Beginning Python, first and second editions, as well as several scientific papers.

What Other Items Do Customers Buy After Viewing This Item?

Customer Reviews

5.0 out of 5 stars
5 star
4 star
3 star
2 star
1 star
See the customer review
Share your thoughts with other customers

Top Customer Reviews

Format: Kindle Edition
whilst most algorithm books worry about the algorithm this worries about getting you to understand - and it covers enough basics that you can start here and grow in confidence
Comment 2 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Most Helpful Customer Reviews on (beta) 3.5 out of 5 stars 14 reviews
35 of 36 people found the following review helpful
4.0 out of 5 stars Very good explanation of basic algorithms 13 Dec. 2010
By Robert Hancock - Published on
Format: Paperback Verified Purchase
- Very clear explanation of a complex subject.
- Each chapter builds upon the previous chapters so that this is more like a class than a reference manual.
- More approachable that the Sedgewick and Cormen.

- The almost constant parenthetical phrases distract from the text and quickly become irritating. After page 20 I just skipped them and found that I understood the concepts more quickly.
- The use of single letter variables in the code examples makes it more difficult to understand the structure of a new concept. When there are several of them, it can become confusing. (See page 207.) Why not just use descriptive variable names?

There are sections that make note of how to implement certain algorithms using Python specific features, and this is very helpful, but this is first and foremost a book on algorithmic theory that happens to use Python for code examples.
12 of 13 people found the following review helpful
2.0 out of 5 stars Really Needs Clean Programming Style 2 Jun. 2013
By Cecil McGregor - Published on
Format: Paperback
While this author presents very interesting topics, following along with coding is particularly difficult. His coding style is very difficult to follow.

His habit of using single character variables (lower and upper case) obfuscates all of his code. This incredibly poor naming convention makes me wonder where this author learned to code.

He writes a function and does not provide accompanying data to create a test of the function. A developer is left to wonder how this function will work in the real world.

While the accompanying source code does contain tests, they are just as difficult to read as the book version. These tests contain few pertinent comments and one is left wondering why any one test exists. The test are certainly not unit tests since they don't apparently cover corner cases. No industrial strength QA would pass this code. And certainly no code review would allow this code into their code base.

This leaves a reader struggling to follow coding examples since he must create his own data to explore the various algorithms.

I'll allow a 4 for material and a 0 for user accessibility. The overall rating is thus a 2.
10 of 11 people found the following review helpful
5.0 out of 5 stars Instructive and Entertaining 5 Jan. 2011
By Mike - Published on
Format: Paperback
I found Python Algorithms not only extremely helpful but an enjoyable read as well, not an easy task for an algorithm book. The text is conversational and well-organized, with numerous side notes that allow the reader to make insightful connections. The author's use of humor is not overwhelming, nor is it so sparse as to confuse novice readers to his intent. His use of sidebars can bog down the topics at times, but this has the advantage of making this text appropriate for readers of all skill levels.

The author also takes great pains to explain Python code within the book, which not only models well-written code to the reader but also takes advantage of eliminating pseudo-code with concrete examples of the Python language. The use of citations and notes on external sources within the book made it possible for me to independently research topics on the web. For more hands-on learners, there are exercises at the end of each chapter. This text could easily be the basis for a college-level class on Python and algorithm theory/development. All in all, a great text and a must-have for the Python programmer!
5 of 5 people found the following review helpful
2.0 out of 5 stars Had high hopes for this book and how it could help increase my Python skills. 7 Jan. 2015
By Brooklyn_Perl - Published on
Format: Paperback Verified Purchase
Someone else appropriately posted that this book is way too verbose for its intended purpose and I whole heartedly agree.
The author berates points in this book that could be explained succinctly, I recently found a web site by a Greek comp-sci undergrad who explains in very plain english how to understand the theoretical computer that every algorithmist uses as a base line.
The author of the web page also explained very simply how to understand Theta, Omega, Big/Little O, tightly bound and loosely bound and so on.

There is a prevalent myth floating around in the world that certain mathematical formulas, scientific concepts and statistical theories are just too esoteric and abstract to explain in real plain english. From reading Magnus book I would say that he is one of those people who chooses to continue to perpetuate that myth.

I would post the link to the website but Amazon deletes web links. But search for a 'gentle introduction to algorithm complexity' and you should find it. The author of that website has a talent to explain technical concepts succinctly and understandbely, you only have to bring some programing background and motivation to understand it.

By contrast in order to read and comprehend this book you have to bring an exposure to and a fetish for theory, indeed a fetish.
I cant imagine what practical Python programmer or any programmer this book is geared for.
I dare say that even for an advanced comp-sci majors this book will become boring very quickly either because it covers everything you *should* already know or you just want to get down to programming.

Where the author could have used plain english and expanded on practical technical concepts the author instead chose to indulge in abstracting theory. A missed opportunity to bring knowledge to a larger audience, instead the author indulges in the theatrics of dedicating a whole book to complicating things.

I doubt the Second Edition is any more readable.
16 of 20 people found the following review helpful
3.0 out of 5 stars It's okay but too chatty. 24 Mar. 2011
By Ian Zimmerman - Published on
Format: Paperback
This book presents a quite broad range of fundamental computer science
algorithms, with all illustrative code written in Python. There is a
strong emphasis on graph algorithms, perhaps reflecting a predilection
of the author. Since I like graphs too I cannot complain about that.

Beyond the actual implementations, the book aims for extra Python
relevance by including asides on Python internals (CPython, to be
precise). I was pleasantly surprised by the ones included, as they go
beyond the trivial. Given the prevalence of graph algorithms heaps (or
priority queues) had to play a central role, and the aside on Python's
heapq module is perhaps the most important of them. I wish there were
more of the Pythonic asides, though.

Even so, the book makes clear how Python's carefully balanced design
enables beautiful, concise implementations. There is almost no low
level busy-work code, the algorithms practically read themselves. And
they are commented too just in case you find a piece difficult to

There's more to algorithms then the implementations, though: one has to
address correctness proofs and efficiency properties. The book
certainly doesn't neglect these, but if there's one clear downside (for
this reader) it is this: too much English, too few symbols. The author
goes to great lengths to use informal language instead of "math" when
discussing correctness and efficiency, and in the end I think he
overdoes it. Here's an example from Chapter 7, on greedy algorithms,
discussing the scheduling problem with hard deadlines, discrete time
and tasks of equal length:

"The last question then becomes, does S' have the same profit as S?
And indeed it does, because the T' cannot have a greater profit than T!
We can prove this by contradiction, based on our greed: if T' has a
greater profit, we would have considered it before T, necessarily
scheduling it somewhere else. (It would have been scheduled, because
there was at least one free slot before its deadline.) But we assumed
that we could extend P to S, and if it has a task in a different
position, we have a contradiction."

Perhaps it's just me (I have a math background) but if I were writing
code to run a nuclear power station I would not be comfortable with
proofs in this style.

I also think this might be a consequence of a more general attribute of
the book, namely its tendency to banter. Phrases like "Cool, no?" or
"This might hurt your brain" are numerous to the point of distracting -
again, for this reader, perhaps not so much for someone younger or with
a different background.

There are many exercises, with hints for solutions in an appendix. Each
chapter ends with an "If You're Curious" section which points you to the
relevant reference items in the bibliography and to some topics related
to, but deeper than, those discussed in the chapter. Some parts of the
text are set in a slightly larger and bolder font, with white titles on
black background. The purpose of this typographic device is not clear.
Maybe they are intended as general asides, but in some cases there are
back references to them later in the main text. In a technical book
this kind of thing is usually explained in the introduction, but not
here. Finally, as a fan I greatly appreciated the xkcd comic strips
included when relevant.

All in all, the book does a large part of what I expected of it. I
would recommend it most of all to someone already familiar with most of
the algorithms but not very familiar with Python, as a very good example
of Python's power. It can also work as a general introduction to the
algorithms, just be prepared to reach for the references in some cases
to clarify and expand your view.
Were these reviews helpful? Let us know