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 answer is more genreal to other languges.
raw, but very beautiful coding
It works. A bit complicated, but still.
Great!
Because python has
truthy
andfalsy
values, falsy values would be0
,''
,[]
,{}
this article can help you understand it better https://www.freecodecamp.org/news/truthy-and-falsy-values-in-python/because
if <expression>
clauses just need to evaluate<expression>
. The computed value is then either true or truthy or not.You can also just write
if True:...
orif False:...
. You don't have to compare your expression toTrue
orFalse
, that is whatif
already does.Why is not: if bool == true: ? to return yes or not
Looks kinda over the top but still a nice solution
This comment is hidden because it contains spoiler information about the solution
Your username is great hahahaha
Nice reference to Rumpelstiltskin
Looks like C code in Python…
This comment is hidden because it contains spoiler information about the solution