What use of string module?

Tim Chase python.list at tim.thechases.com
Tue Jun 2 12:39:30 EDT 2015


On 2015-06-02 04:37, Mark Lawrence wrote:
> > I read the online help about string. It lists string constants,
> > string formatting, template strings and string functions. After
> > reading these, I am still puzzled about how to use the string
> > module.
> 
> I suggest you don't bother, it's effectively dead having been
> replaced by string methods.

While most of the functions in the string module are obsoleted by the
methods on strings, I still find the constants useful to save myself
from my own inability to type, possibly omitting letters from the
alphabet or doubling them up.  I'd much rather just reference
string.printable than try to recreate it (or its kin) myself.

-tkc






More information about the Python-list mailing list