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.
fast and practical
YASSSS QUEEN!!!
Very simple.
Great
This is a generator comprehension actually, so slightly more efficient.
On call func, traceback - TypeError: 'int' object is not iterable
This comment is hidden because it contains spoiler information about the solution
i thought this woudnt work. The more you know
This comment is hidden because it contains spoiler information about the solution
Man it didn't even came in my mind
Very nice solution
These are called list comprehensions
I try to show u. For example we have a list with numbers [1,2,3,4] in ur first case script do this: return sum(1 * 1) it's wrong cause u didn't get sum all numbers in list [1,2,3,4], in ur loop u get just numbers 1,4,9,16 and u don't get sum those numbers
In second case, first step take square each number and after we get sum all numbers that have been squared 1^2 + 2^2 + 3^2 + 4^2
where do people learn this one liner syntax i see everywhere?
Edit: I wrote something but it was wrong. I actually don't know.
me neither, but after learning the basics of python, I'm now starting to practice list comprehension. Makes a bit more sense each time.
Loading more items...