Advertisement
Swedenstyle34

Product Key Generator In Python 3

Jul 26th, 2021
1,157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. import random
  2. chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"
  3. while 1:
  4.     key_len = int(input("What length would you like your key to be?: "))
  5.     key_count = int(input("How many keys would you like?: "))
  6.     for x in range(0,key_count):
  7.         key = ""
  8.         for x in range(0,key_len):
  9.             key_char = random.choice(chars)
  10.             key      = key + key_charprint("Here's your key: ", key)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement