def key2param(key):
 result = []
 key = list(key)
 if (not key[0].isalpha()):
  result.append('x')
 for c in key:
  if c.isalnum():
   result.append(c)
  else:
   result.append('_')
 return ''.join(result)

def key2param ( key ) : result = [ ] key = list ( key ) if ( not key [ 0 ] . isalpha ( ) ) : result . append ( 'x' ) for c in key : if c . isalnum ( ) : result . append ( c ) else : result . append ( '_' ) return '' . join ( result )
converts key names into parameter names .