Note 9.19.1.
This workspace is provided for your convenience. You can use this activecode window to try out anything you like.
string
module provides several constants that are useful for these purposes. One of these, string.digits
is equivalent to “0123456789”. It can be used to check if a character is a digit using the in
operator.string.ascii_lowercase
contains all of the ascii letters that the system considers to be lowercase. Similarly, string.ascii_uppercase
contains all of the uppercase letters. string.punctuation
comprises all the characters considered to be punctuation. Run the following:string
module documentaiton (see Global Module Indexhttp://docs.python.org/py3k/py-modindex.html