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.
Yes, Unnamed, you're entirely correct and this definitely should come under 'clever' rather than 'best practice'.
Additionally
+
constructs a new list, which is rather inefficient. I don't know about*
though. Have a look at my solution, iterators are made for such things.It doesn't really matter since for a solution written just for looks anything goes while for an optimal solution creating a list of (possibly 10000) Nones just to traverse it once and destroy is strange anyway.
You're correct. I used just
[None]*len(keys)
for the sake of brevity, but ideally you'd use[None]*(len(keys) - len(values))
in practice.