def same(*values):
 if (not values):
  return True
 (first, rest) = (values[0], values[1:])
 return all(((value == first) for value in rest))

def same ( * values ) : if ( not values ) : return True ( first , rest ) = ( values [ 0 ] , values [ 1 : ] ) return all ( ( ( value == first ) for value in rest ) )
check if all values in a sequence are equal .