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.
Yea, that looks like it would work.
I've done that before too trying to return
random.shuffle([1, 2, 3])
. Same idea, it modifies the list in-place but returnsNone
. We all make mistakes, part of the learning process!This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Ah now I get where the problems comes from. So the test case is exactly what is happening, the funny guy is giving less cards than expected e.g. an empty array or...no array (~~default value)
This comment is hidden because it contains spoiler information about the solution
Thanks for noticing that. I updated all solutions (initial and complete) for all languages
Why do you expect a TypeError?
And python offers builtin array element loop. Don't try to write C++:
Would print:
This comment is hidden because it contains spoiler information about the solution