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.
.
Added inputs to assertion messages and approved.
Additionally, the tests expect single spaces between the resulting words, even though cases may be generated that result in chunks of multiple space characters after removing punctuation.
Thank you. Fixed now. Surprisingly many invalidations .. :]
what would be the 'real' best practice code for this?
:D
Another thing to consider is that the object passed in the
items
parameter may handle indices differently than a standard list (maybe it doesn't support negative indices, for example). In that case, checking thatindex
is between-len(items)
andlen(items)-1
might lead to unexpected behavior.fixed
Thank you :)
I can't stands this no more ... forked and fixed!
Approved!
Yep, you're right. Lots of people around think "best practice" == "shorter".
Meanwhile, as a student we often have to balance between computer efficiency (may take some times/tests to get the more economical code) and human efficiency (throw a working solution in minute, letting the computer struggle with it). And this choice depends on criterias as different as available time, feeling, effort/reward ratio, previous problem, affinity, hunger/fatigue state, etc. =)
Hence, you sometime just want to do an humble and anonymous code solving it fast and go next, then see it highlighted because people confuse "state of art" with "straightness", "obvious" with "powerful"…
Loading more items...