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.
dang how did we all end up with the exact same code lmfao
Nice.
Much better than mine
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Also, for lists it returns True if not and empty list
Wooow. I`ll save it as an great example of using lambda functions
if result:
is the same as writingif result == True:
if checks the validity of the condition.This comment is hidden because it contains spoiler information about the solution
This is awesome!
This comment is hidden because it contains spoiler information about the solution
Can you explain the reduce?
Yeah, you are right, missed that, should have used an approach like any(e in ...) ^^.
This is not correct. It will give false positives, for example if array1 = ["abc"] and array2 = ["cab", "cat"], r will be ["abc"] but should be []. Nice approach otherwise.