https://github.com/TheAlgorithms/Python/blob/master/other/password_generator.py

from random import choice from string import ascii_letters, digits #, punctuation chars = ascii_letters + digits # + punctuation length = 8 # 8 is really too short for the state of computers in 2021! for number_of_passwords in range(4): print("".join(choice(chars) for x in range(length)))