quiz/utils.py
changeset 12 81cd0140a0f2
child 39 0fa055b8ea98
equal deleted inserted replaced
11:afc41af983e5 12:81cd0140a0f2
       
     1 import string
       
     2 import random
       
     3 
       
     4 def gen_key(no_of_chars):
       
     5     allowed_chars = string.digits+string.uppercase
       
     6     return ''.join([random.choice(allowed_chars) for i in range(no_of_chars)])