0

нужен генератор кодов до 8 знаков

7th Sep 2016, 9:18 PM
miron
2 Antworten
0
import random import string code="" symbols = string.ascii_lowercase + string.digits + string.ascii_uppercase + string.digits code_length = int(input("input code length (min:1, max:8): ")) if code_length > 0 and code_length <=8: for i in range(code_length): code += symbols[random.randint(0,len(symbols)-1)] print("your code: " + code) else: print("error: invalid code length")
8th Sep 2016, 4:08 AM
Textobot
Textobot - avatar
0
cпасибо большое
8th Sep 2016, 5:18 AM
miron