/ Published in: Python
                    
                                        
A simple python password generator...
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
import random
def main():
while True:
stop = input("Generate password? y/n: ")
if stop and stop[0].lower() == "n":
break
length = int
size = input("What length do you want the password to be(4-20): ")
length = int(size)
chars = string.ascii_letters + string.digits
return ''.join(random.choice(chars) for x in range(length))
Comments
 Subscribe to comments
                    Subscribe to comments
                
                