def shuffle_slice(x, start, stop=None):
 if (stop is None):
  stop = len(x)
 for i in reversed(xrange((start + 1), stop)):
  j = random.randint(start, i)
  (x[i], x[j]) = (x[j], x[i])

def shuffle_slice ( x , start , stop = None ) : if ( stop is None ) : stop = len ( x ) for i in reversed ( xrange ( ( start + 1 ) , stop ) ) : j = random . randint ( start , i ) ( x [ i ] , x [ j ] ) = ( x [ j ] , x [ i ] )
given a list .