[python] Paste

Viewer

  1. import random
  2. import string
  3.  
  4. def generate_password(length):
  5.     characters = string.ascii_letters + string.digits + string.punctuation
  6.     password = ''.join(random.choice(characters) for i in range(length))
  7.     return password
  8.  
  9. print(generate_password(12))
  10.  

Editor

You can edit this paste and save as new:


File Description
  • Paste
  • Paste Code
  • 26 Apr-2024
  • 267 Bytes
You can Share it: