While I could not have written that little script in the short time you used I think you should have shown a bit more patient and tried to get to know Python a bit better.
I am not an expert (nor a programmer) but a few things you should note if ever you update this article (I think you should because otherwise, as it does you no favor for e.g. your book sales).
- As you noted Python is open source and there are quite a few ways to get documentation which is searchable and has an index (one I use is Boa and IDE for Python).
- The slash at the end of the line is not required, either tripple quote your string or any type of brackets will do the trick.
- The indentation - Just moving braces is in my view creating crappy code which no one can read, so Python forcing you to follow a BASIC style code is very good. I can only point out that probably just about any IDE will do the indentation just about by itself.
Until I see some other articles from you I will look at other authors first!