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.
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("")
Though it doesn't elevate the solution, I enjoy the observation as boolean/string behavior is a big hangup when moving between languages.
Yeah, it's almost like that isn't in the spec!
Ah yes, good catch. I was going for dense and elegant, and missed that case.
This one counts the string "True" along with the boolean True.
This one counts the string "True" along with the boolean True.