In this lesson, you’ll learn about the string module. This module will help you quickly access some string constants. Here’s an example:
>>> import string
>>> string.digits
'0123456789'
>>> string.ascii_lowercase
'abcdefghijklmnopqrstuvwxyz'
Here are some useful constants:
string.ascii_lettersstring.ascii_uppercasestring.ascii_lowercasestring.digitsstring.hexdigitsstring.octdigitsstring.punctuationstring.printablestring.whitespace
You can check out the Python documentation on the string module.

abhinav on Jan. 7, 2021
I’m having trouble understanding why the
allstatement stops after the first print.