import string from random import choice def generate_like_this(password): password_content = [ string.digits, string.punctuation, string.ascii_lowercase, string.ascii_uppercase ] new_pass = '' for p_char in password: for p_list in password_content: if p_char in p_list: new_pass += choice(p_list) return new_pass result = generate_like_this('abc123/*') print(result)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter