def gen_item(fmt, obj):
 (mode, chars) = fmt.split('#')
 x = []
 for c in chars:
  x.append(randrange_fmt(mode, c, obj))
 return (x[0] if (len(x) == 1) else tuple(x))

def gen_item ( fmt , obj ) : ( mode , chars ) = fmt . split ( '#' ) x = [ ] for c in chars : x . append ( randrange_fmt ( mode , c , obj ) ) return ( x [ 0 ] if ( len ( x ) == 1 ) else tuple ( x ) )
return single random item .