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.
Amazing amazing! I appreciate this soltion to help me revise Try Except! :)
OmG 😢😢.
that was a bit similar to mine, but i should have thought of that.
anyways i dont know how i succeded😅😅
lol
But if the function gets called like last("hi", "bye") this would return "e" and from what I understood this should return "bye" with that input.
It seems the kata needs more tests or clarify that in the instructions.
Not best practice. Bare excepts are a good example of what NOT to do. If you want to handle an exception, handle that specific exception, e.g.:
except TypeError:
can you please explain why number*=10
When a parameter is called with an asterisk (*args), it can accept multiple arguments and will return the arguments as a tuple.
If the argument tuple is nested (that is, another array is inside of it) you can call the last element in that array inside the tuple. Array[-1] gets the last item and if that item is a nested array then Array[-1][-1] will be needed to look at last element in that.
Example:
TL;DR It looks at nested items from the tuple argument.
what does args[-1][-1] do? I can't find the answer online.