You need to sign in or sign up before continuing.×
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.
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.
I think it is better to train yourself to be a oneliner. Actually I am new here. It is my second day here. And I am trying my best to complete challenges with one line only. It is fun you know. And it changes your mind a lot. THANK YOU ONE LINERS. You teach me a lot.
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
Everytime.
what's wrong about this solution and which would be best practice in this case?
This comment is hidden because it contains spoiler information about the solution
It is not
Haha I almost forgot this method(ty for reminding)
This comment is hidden because it contains spoiler information about the solution
nah using global inside function is more confusing than just using uppercase for constants and you can use them without declaring global in all functions.
One of the baddest practice
This comment is hidden because it contains spoiler information about the solution
Yes you can check mine
it applies function to all instance of a
I know using sum is not optimal, but still used it XD
Loading more items...