def calc_parity_vector(parity_vector):
 return reduce((lambda x, y: (x ^ y)), parity_vector[1:])

def calc_parity_vector ( parity_vector ) : return reduce ( ( lambda x , y : ( x ^ y ) ) , parity_vector [ 1 : ] )
returns even or odd parit for parity vector .