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.
Your code iterates through the entire string before checking the length. And it needs to, because the content matters.
whats the point of checking for the length after iterating through the entire string? sure its a cleaner code but i think it misses the point of checking the validity of the input for an efficient code
bro. this kata took me a full hour... meanwhile we got this solution with a few lines.... lol
This comment is hidden because it contains spoiler information about the solution
Then wouldn't "h" be a valid input? --> "#H". I guess single char is not a "word"
Wow, absolutely did NOT think of using that function. I should read the docs more...
Someone who understood the question and mapped the answer to a programming language precisely. Kudos!
This comment is hidden because it contains spoiler information about the solution
Use spoiler flag next time, your post was visible in the homepage.
I didn't know a word could start with a hashtag I thought just letters
This works but if input starts with '#' this will generate two hashtag. Like generate_hashtag('# test word') will generate '##TestWord'.
i made the whole functions using c++ ;( , tho i only know c++ i think python gives you some edge
It's faster
Way too many unnecessary actions for the code that can be written in one line and more effectively.
Very elegant.
Loading more items...