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.
Mutates in the input. Definitely not best practices.
A few notes for Python 3:
defaultdict.viewvalues()
has been replaced withdefaultdict.values()
,xrange()
no longer exists butrange()
now behaves the way it used to, anditertools.izip()
no longer exists but the builtinzip()
now behaves the way it used to.Sorry, didn't realize the spoiler flag was needed on solutions.
This comment is hidden because it contains spoiler information about the solution
The
[[True]]
test doesn't feel very Pythonic; you have to practically bend over backwards to accomodate it-- I had to specifically check that the value is not abool
becausebool
is a subclass ofint
. If the language thinks1
andTrue
are equivalent, why do we care?