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 comment is hidden because it contains spoiler information about the solution
Hi, kgashok
The way you name the keyword arguments might kind of confuse the reader,
since conventionlly we name keyword arguments using the word 'kwargs' in
order to avoid confusion with 'args', which is actually short for '(positional) arguments'.
For more information on how to name parameters with the ** sign, see:
http://book.pythontips.com/en/latest/args_and_kwargs.html
Thanks a lot for your generic solution, which is really really impressive.
I learned a lot from it. And for the sake of my understanding, I added some comments to your source code.
Thank you for your reply.
Are you sure that '3' comes from the number of arguments?
Well, I think you might've meant the number of parameters except 'x', which is also the length of
the list containing a, b, c, etc., right?
And I should've said, "Before replacing '3' with 'len(l)', you have to manually type in as many parameters as you want."
Very impressive!
You also inspired me!
To make it more generic, we can replace '3' with len(l).
A clever solution.
This solution would be much better if the .keys() part could be left off,
since calling the dict.keys() method is unnecessary.
if merch not in stock, which could do the same thing as if merch not in stock.keys()
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution