def generate_randomkey(length):
 chars = (string.letters + string.digits)
 return ''.join([choice(chars) for i in range(int(length))])

def generate_randomkey ( length ) : chars = ( string . letters + string . digits ) return '' . join ( [ choice ( chars ) for i in range ( int ( length ) ) ] )
generate random key .