from secrets import choice
from string import ascii_lowercase, ascii_uppercase, digits

characters = ascii_letters + ascii_uppercase + digits
length = 16
random_password = ''.join(choice(characters) for character in range(length))
print("Wygenerowane hasło:", random_password)