• ###### Feh555commented on "Square(n) Sum" python solution

fast and practical

• ###### buzby08commented on "Square(n) Sum" python solution

YASSSS QUEEN!!!

Very simple.

Great

• ###### Stanley558commented on "Square(n) Sum" python solution

This is a generator comprehension actually, so slightly more efficient.

• ###### dsokolovcommented on "Square(n) Sum" python solution

On call func, traceback - TypeError: 'int' object is not iterable

• ###### Toolmeezycommented on "Square(n) Sum" python solution

This comment is hidden because it contains spoiler information about the solution

• ###### CodyTech123commented on "Square(n) Sum" python solution

i thought this woudnt work. The more you know

• ###### reallyreallyryancommented on "Square(n) Sum" python solution

This comment is hidden because it contains spoiler information about the solution

• ###### Bazargan_Devcommented on "Square(n) Sum" python solution

Man it didn't even came in my mind
Very nice solution

• ###### Twinklebunzcommented on "Square(n) Sum" python solution

These are called list comprehensions

• ###### 1234GGtwX7commented on "Square(n) Sum" python solution

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

• ###### RedIronRavencommented on "Square(n) Sum" python solution

where do people learn this one liner syntax i see everywhere?

• ###### user204650commented on "Square(n) Sum" python solution

Edit: I wrote something but it was wrong. I actually don't know.

• ###### CharBeebcommented on "Square(n) Sum" python solution

me neither, but after learning the basics of python, I'm now starting to practice list comprehension. Makes a bit more sense each time.