import random
listas = {
"numeros" : {'0','1','2','3','4','5','6','7','8','9'},
"maiusculas" : {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'},
"minusculas" : {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'},
"especiais" : {'!', '#', '$', '%', '&', '(', ')', '*', '+', '>', '<', '^', '~', '@', '-', '_', 'ç', 'Ç','`', '/', '|', 'ª', 'º', '¿'}
}
tipos = list(listas.keys())
lista_senha = []
for tipo in tipos:
contador = 1
while contador <= 3:
letra = random.choice(list(listas[tipo]))
lista_senha.append(letra)
contador += 1
random.shuffle(lista_senha)
senha = ''
for letra in lista_senha:
senha += str(letra)
print(f'Senha gerada:{senha}')