quiz/utils.py
author nishanth
Tue, 20 Apr 2010 23:29:44 +0530
changeset 23 f57c30096b51
parent 12 81cd0140a0f2
child 39 0fa055b8ea98
permissions -rw-r--r--
added the link on home to attempt quiz

import string
import random

def gen_key(no_of_chars):
    allowed_chars = string.digits+string.uppercase
    return ''.join([random.choice(allowed_chars) for i in range(no_of_chars)])