What use of string module?

Steven D'Aprano steve+comp.lang.python at pearwood.info
Tue Jun 2 03:21:42 EDT 2015


On Tuesday 02 June 2015 12:14, fl wrote:

> Hi,
> 
> 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.
> 
> Could you show me a few example about this module?


import string

c = "d"
if c in string.ascii_lowercase:
    print "character is an ASCII lower case letter"



-- 
Steve




More information about the Python-list mailing list