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.
I see. Thank you for clarifying. I've never used Python 2, so I wouldn't know. Haha!
This solution is for Python 2, and that's been already mentioned 7 years ago by runzhi214 and frankturnerv.
In other programming languages, like JavaScript, it returns a returns a new array from an original array based instructions you give it. It works similarly in Python, only the list isn't return. It iterates through a list and applies changes you've specified using a function to each element in the list, or multiple lists. I hope this helps some.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
here are few examples to simplify it:
map(int, a) --> apply int to every list object in list a to make them integers
map(str, a) --> apply str to every list object in list a to make them strings
This is a clever use of exceptions, though I would avoid this in production code. Raising exceptions is costly, and also if "a" happens to be a long string you would be creating a string 50 times larger.
good use!
I wrote exactly this and it failed lmfao, what??
python new test framework is required. updated in this fork
Thuis a brilliant codewar
Thanks!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
starting to using less and less wording... nice ;)
Loading more items...