Ad
  • Custom User Avatar

    The requirement to check for other types really goes against the nature of dynamic typing and unnecessarily adds orthogonal complexity to the problem.

  • Custom User Avatar

    I think it's perfectly fine, this is exactly why bool is a subclass of int. If the upcasting upsets you so much then you can just do sum(1 for ch1, ch2 in zip(a, b) if ch1 != ch2).