Gerador de senhas em Python

import stringimport randomdef randompassword():  special_chars = '~@!?/%$#*^`´;:<>'  chars = string.ascii_uppercase + string.ascii_lowercase + string.digits + special_chars  size = random.randint(30, 32)  return ''.join(random.choice(chars) for x in range(size))for i in range(40):  print(randompassword())

Gera senhas com caracteres de 30 a 32 com os caracteres presentes na variável chars.

You should also read:

Fazendo os prints do Python aparecerem no systemctl status

fazer todos os prints passarem o parâmetro flush=True [code language="python"] import functools print = functools.partial(print, flush=True) [/code] https://stackoverflow.com/questions/230751/how-to-flush-output-of-print-function https://fhackts.wordpress.com/2014/11/27/systemd-journal-not-showing-python-3-print/