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.
This was written in Python 2.7.6 (way back when Codewars only supported Python 2.7.6), so try to be less rude when you're wrong. Or all the time, really. kthxbei
wrong, now that python 3 use zip as a generator/iterator.
This comment is hidden because it contains spoiler information about the solution
To
count
you need a list, here is generator expression.I think it's perfectly fine, this is exactly why bool is a subclass of int. If the upcasting upsets you so much then you can just do
sum(1 for ch1, ch2 in zip(a, b) if ch1 != ch2)
.Don't look at me; I'm using CodeWars to learn Python. ;-)