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 suppose it could be the opposite: a list could be created under the hood to pass it to sum(). So when a list is declared straightforward - it can be more efficient. I noticed that usually list comprehension shows faster result than generator.
But even more faster and memory efficient can be the for loop since in this case there is no additional iterable would be created at all.
Thank you
This comment is hidden because it contains spoiler information about the solution