[Tutor] how to split/partition a string on keywords?

Alan Gauld alan.gauld at btinternet.com
Fri Aug 24 02:02:12 CEST 2012


On 23/08/12 23:08, akleider at sonic.net wrote:

> (I often find myself wanting to hack in "off line environments" so
> something as old fashion as a book would be nice:-)

Depends how off line you are.
If you still have the python interpreter then just using dir() and 
help() should be all you need.

I couldn't recall how partition worked so I just typed 
help(''.partition) at the >>> prompt.

Most documentation you need is available that way, and if in doubt try 
it out at the prompt!

But if you mean offline as in only paper and pencil then a book is the 
best bet and Beazley is good. I use him and Python in a Nutshell for my 
paper-only moments.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list