Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
As @St3f4n wrote above, I believe this is caused by @marcusaurelius's solution modifying the input list. JavaScript version works because the test gives a copy of generated array. I don't recommend modifying the input either, but to prevent further issues like this, I think it's better for the Python tests to also copy the generated list.
Relevant parts of the current tests:
edit: Just tried @marcusaurelius's solution from above and confirmed that it passes all tests if a new list is created and returned (without modifying input list)
The tests are using the function that you wrote and no more.... if you
import re
outside of the function, it wouldn't get picked up when the function is called in the tests.I'm not an expert in Python but I think the problem is that you are changing the input array with
strings[0] = a
.strings[1] = b
In javascript the array was copied before given as input. Either way dont ever modify the input(always copy it if its an object or array/list) to the function, that can influence the testing. Hope that was helpfull.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
okay so it looks like the submit solution button for python isn't calling the function, I just rewrote my solution so that it doesn't use the re module and it passes all test cases, but fails when I press "attempt". When I include the value that caused the failure in my test case list, my code passes - so something must be going wrong behind the scenes...
This comment is hidden because it contains spoiler information about the solution
I run my code in Python on my local machine - and it works, I run the test cases and my solution works, I submit the code and it fails on cases that, when I test, my code suceeds on. This must be broken...
The testcases for python are correct, your solution must be wrong;-)...