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 comment is hidden because it contains spoiler information about the solution
This is based on how Python evaluates boolean expressions.
After evaluating, Python returns the corresponding side of the expression.
Here is the explanation:
and
: Whena == []
(a empty),[]
is evaluated asFalse
, so[]
is returned.and
: inside the bracketsa. Left side of
or
:list.remove
modifies the list in place and then returns alwaysNone
, which is evaluated toFalse
.b. Right side of
or
: the expression always goes here and returnsa
Edit: you can take a look at my kumite - shorter and easier to understand
NB: Sorry CW breaks markdown nested list syntax...
This comment is hidden because it contains spoiler information about the solution
Thank you for commenting your code!
Can you please explain?? This is mind blowing!