Ad
  • Custom User Avatar

    Python: missing

    from solution import alphanumeric
    import codewars_test as test
    

    in the sample tests and full tests

  • Custom User Avatar

    there is actually an issue here. since Codewars moved away from concatenating the user's solution and the tests for Python, whatever renaming and imports the user makes should stay contained within the solution module. however, because the Python tests suite does not explicitely import the user's function in this kata, Codewars inserts from solution import * to the tests for backwards-compatibility. alphanumeric should be imported explicitely instead; raising an issue about that

  • Custom User Avatar

    the reason your code fails is because you overwrite str in your import line

    this means str is no longer what it should be in the Python code,
    and so that breaks the tester

    this is why you should never overwrite a built-in function, a module name, or a keyword, et cetera

  • Custom User Avatar

    first, you should use a spoiler flag if you post code

    I added the flag to your comment

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution