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.
Simple Regular Expression Kata
If someone is as confused as I am and thinks that there is an issue in the kata's JavaScript tests, trust me: there are NO issues.
this is not what is happening. your code returns
true
for an empty string, while the expected value isfalse
. Your print the input string, but since it's empty and you did not add delimiters, you cannot see it and you think the input was the previous one.the tests cannot find your function if you change its name; don't do that
duplicate of this issue
fixed
closing as not a proper issue report
That's not a 5kyu task, bruh
description: don't mention null. strings are not null. null is when you DON'T have a string. which we do. that's already specified.
Requiring a regex and moving to 6 kyu would be more appropriate for Python.
Python: missing
in the sample tests and full tests
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 insertsfrom solution import *
to the tests for backwards-compatibility.alphanumeric
should be imported explicitely instead; raising an issue about thatthe reason your code fails is because you overwrite
str
in your import linethis 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
first, you should use a spoiler flag if you post code
I added the flag to your comment
Loading more items...