Skip to content

Instantly share code, notes, and snippets.

@Priler
Created July 9, 2021 10:06
Show Gist options
  • Save Priler/60e07ac8d2c977a46aac6adb63e5bdb5 to your computer and use it in GitHub Desktop.
Save Priler/60e07ac8d2c977a46aac6adb63e5bdb5 to your computer and use it in GitHub Desktop.
import random
# используемые символы
chars = 'abcdefghyjklmnopqrstuvwxyz'
chars += chars.upper()
nums = str(1234567890)
chars += nums
special_chars = '!@#$%^&*()_+-'
chars += special_chars
length = 8 # длина пароля
password = "".join(random.sample(chars, length))
print(password)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment