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.
@ben-hatcher, excellent explaination. Now I understand this much better.
Brilliant explanation, ben-hatcher. I did it davpaez's way, which appears to be faster asymptotically judging by the above discussion, but keeping memory in mind is in top form.
it's a generator expression. Instead of creating a list of all elements it creates an iterable object that returns a single element at a time, which sum() can still operate on. You could also add square brackets and it should still work (because both lists and generator objects are iterable) but will use more memory.