def random_permutation(iterable, r=None):
 pool = tuple(iterable)
 r = (len(pool) if (r is None) else r)
 return tuple(random.sample(pool, r))

def random_permutation ( iterable , r = None ) : pool = tuple ( iterable ) r = ( len ( pool ) if ( r is None ) else r ) return tuple ( random . sample ( pool , r ) )
random_product -> tuple arguments: iterable: an iterable .