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.
It worked finally, thank you so much guys! @Chrono79 @Mednoob
This comment is hidden because it contains spoiler information about the solution
Thank you, I did not even notice it! On my IDE the space does not appear, can I share a screenshot?
Do you know I could refactor my existing code to make the space disappear, if possible?
@zr.hossain
See carefully, there is space in your answer. So, no. It's not the same.
Bro how is it wrong? When you run it you get the output you expect. Try run the code with any string, you will get the output you expect without the first and last character. When I use 'world' it prints 'orl', when I use 'hello' it prints 'ell', etc. When I originally run the test for this code in the kata IDE, it said failed, expect 'loquen' but obtained 'loquen'. It gave me character by character the same thing. Please try run the code and check yourself the expected strings.
Your code is wrong, not a kata issue. If it has two chars less, why do you use the same length?
This comment is hidden because it contains spoiler information about the solution
Random Perl tests produce strings with less than two characters.
:) ....... ptr...
Yes, my bad, thanks. It worked!
Did you
print
orreturn
s? You need toreturn
it.This comment is hidden because it contains spoiler information about the solution
The random test cases put your code to the absolute test to make sure it is valid for anyone to use. And yes, the random test cases use extremely janky inputs that look very confusing...
You can, I just did it in python. Pretty easy and for me, it did not always return None.
Can I really solve it with Python? It returns None always, and chat Gpt is clueless...
Loading more items...