Ad
  • Default User Avatar

    Pretty anything immutable. Tuple is great.
    Its definitely not a problem for kata itself, rather developing bad practice for greenhorns. IMO, for sure.

  • Default User Avatar

    Passing list as argument to function is kind of antipattern for python in most cases

  • Default User Avatar

    Last testcase ( test.assert_equals(is_prime(-1), False, '-1 is not prime') ) have nothing to do with prime numbers. Primes is positive by definition

  • Default User Avatar

    This really shouldn't be neither "best practice" nor "clever". Memory usage here is insane, doesn't worth any readability (if there's any here)