I've been meaning to do a bit of hacking in Python for a while now, but haven't really had the free time what with the mountain of uni work. Now I'm all done and nearly a graduate, I thought it'd be a good time to give Python a go.
In the attempt of killing two birds with one stone, I thought it'd be quite an interesting challenge to work through my big fat book of algorithms and implement them in Python, because hey, you can never implement too many algorithms right?
I thought I'd start of gently, so the first one I tackled was the simple version Quicksort:
I'm pretty impressed with Python so far, albeit only having played around for a short time. I like the fact that curly brackets are out; the whitespace-sensitivity makes for much cleaner and easier-to-read code than I'm used to. I also think that the syntax in general encourages much leaner code; I remember my implementation of the same algorithm in Java was many more lines.
Next stop: in-place quicksort.