def binary_repr(number, max_length=1025):
 shifts = list(map(operator.rshift, (max_length * [number]), range((max_length - 1), (-1), (-1))))
 digits = list(map(operator.mod, shifts, (max_length * [2])))
 if (not digits.count(1)):
  return 0
 digits = digits[digits.index(1):]
 return u''.join(map(repr, digits)).replace(u'L', u'')

def binary_repr ( number , max_length = 1025 ) : shifts = list ( map ( operator . rshift , ( max_length * [ number ] ) , range ( ( max_length - 1 ) , ( - 1 ) , ( - 1 ) ) ) ) digits = list ( map ( operator . mod , shifts , ( max_length * [ 2 ] ) ) ) if ( not digits . count ( 1 ) ) : return 0 digits = digits [ digits . index ( 1 ) : ] return u'' . join ( map ( repr , digits ) ) . replace ( u'L' , u'' )
return the binary representation of the input *number* as a string .