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.
No, think about it like
0 == False
if you do
True and False
orFalse and True
== Falseyou always get False
similar to that is
9 and 0
or0 and 9
== 0because 0 == False
shouldn't it also return 0 if n is anything elses than 9 ? (juste trying to understand it correctly)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The [] lead to list comprehension which will actually create the array. Omitting [] is the same as replacing it by (). That is a generator expression, which does not construct the array first and should therefore be preferred.
You are right, the brackets are not needed. Further, they are not wanted - the code would be better (clearer and more efficient) without them.
Yeah, it's not the most readable code. Having trouble looking it over myself over a year later.