Show pageOld revisionsBacklinksExport to PDFBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== True random password generator in python ====== <code python> import string import secrets def GenPwd(len): allowed_chars = string.ascii_letters + string.digits + string.punctuation exclude_chars = {'\n', '\r', '\t', '\x0b', '\x0c'} valid_chars = ''.join(char for char in allowed_chars if char not in exclude_chars) password = ''.join(secrets.choice(valid_chars) for _ in range(len)) return password print(GenPwd(16)) </code> development/python/true_random_password_generator.txt Last modified: 2024/02/05 09:33by tplecko