alphabets range using re 1

alphabets range using re

>>> import string
>>> string.ascii_lowercase
'abcdefghijklmnopqrstuvwxyz'

Here is what the above code is Doing:
1. We import the string module.
2. We use the string.ascii_lowercase variable to get all the lowercase letters.
3. We use the string.ascii_uppercase variable to get all the uppercase letters.
4. We use the string.digits variable to get all the digits.
5. We use the string.punctuation variable to get all the punctuation characters.
6. We use the string.printable variable to get all the printable characters.
7. We use the string.whitespace variable to get all the whitespace characters.

Similar Posts