Advertisement
KirchohexSX

python random password script

Dec 22nd, 2022
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. import random
  2. import string
  3.  
  4. def generate_random_word(length):
  5. return ''.join(random.choices(string.ascii_letters + string.digits, k=length))
  6.  
  7. # Test the function
  8. print(generate_random_word(8))
  9.  
  10.  
  11.  
  12. --jogs#2535
Tags: python
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement