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.
thanks a lot!
I like the simplicity of the solution. It's a rare case where using "magic numbers" and manually writing out each of the possibilities (instead of a loop) is actually okay and still quite readable.
One small suggestion: consider using bitwise | instead of +=. I think the result would be just as readable.
I like the use of the xrange loop to quickly get the "ret" at the right place. I would suggest to have more descriptive "raise" messages but otherwise this solution reads quite well.