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.
I want to know what does [3, 3, 0, 1][cakes % 4] means??
Not best practice, since it overwrites a built-in.
The kata is written with the variabler
lst
so this isn't an issue of the kata.I think the question is a bit misworded. The question should say we are to find the number of subsets from a set, not subsets from a list. If it's the first case, then by definition all elements should be unique.
2^n is correct if you assume unique elements in the list.
I tried 2**(len(set(lst))) as the answer and it didn't like it in the test cases,
so they are assuming each item is unique.