python's built-in library string is a good thing, using string can be used to generate passwords, or surprise password strength detection;
Randomly generate passwords
When it comes to randomness, we can't help but mention another built-in library random in python;
random is a random number function, including multiple random number generatorsMethod:
string is a built-in string in python;
whitespace = ' \t\n\r\v\f'ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'ascii_letters = ascii_lowercase + ascii_uppercasedigits = '0123456789'hexdigits = digits + 'abcdef' + 'ABCDEF'octdigits = '01234567'punctuation = r"""!"#$%&'()*+,-./:;<=>[email protected][\]^_`{|}~"""printable = digits +