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.
Absolutely agreed. The description is very uncomprehensible, it was a big time waste.
Then you do a bit of math above the examples, rule out a few incorrect ideas and you go test the idea that seems correct. After a minute of coding, done.
I don't even feel much satisfaction or gratification after this, I can just say this Kata is an utter garbage and an overrated waste of time.
Read the description N times, still couldn't get it. Looked at example, remembered doing something related at school. Blindly implemented mathematical solution and solved the problem.
Programming is != Mathematics, lecturers and teachers usually fails to understand this, it looks like similar problems are coming up to the surface in Codewars as well.
In general, generators are faster than list comprehensions because generators don't have allocate memory for a new list. See, https://wiki.python.org/moin/Generators for more details.
Code using generator: return sum( 1 for sheep in arrayOfSheeps if sheep == True )