+ 1
How to Password Generator Python Code?
import random import string def generate_password(length): """Generate a random password of a given length""" characters = string.ascii_letters + string.digits + string.punctuation password = ''.join(random.choice(characters) for i in range(length)) return password # Example usage password = generate_password(12) print(password)
1 Réponse
+ 8
People are more likely to test your code when you LINK it instead of pasting it into the description. Also, describe what issue you encounter.