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.
Beautiful...
Nice. Better than sum() since len() is O(1), takes constant time.
This is because any string that is not '' is "truthy", much like how any number other an 0 (or 0.0) is also "truthy". Unlike, say, PHP, the string 'False' is also "truthy".
it would allso count 1 or 2 or 142892 for that matter but not int(0) or str("")
thanks for the reply.
well i made a mistake, accidently opted ruby instead of python. thats why😅😂
In ruby you have 2 types of slicng: m..n - meaning from m till n INCLUSIVE and m...n which does not inclue n. If that answers you question :)
why is it name[0..1]
unlike the python slicing #name[0:2]
#help me, i'm desperate
This comment is hidden because it contains spoiler information about the solution
So clever :) another thing learned