Quick and dirty Python version, one year later

Without looking at my original java code, I wrote this up in Python. Much few lines of code!