i dont know if thats better. but both solutions are a lot better than a statement that contains about half a dozen implied negations.
can they be great artisans? sure.
why do i think its not better? i said im not sure. i think the two options are about equal in readability, up to taste. yours is probably more efficient in terms of cpu cycles.
whats your sticking point?
It's not right. It doesn't give you the value 10, as you'd "expect".
2
2+4 = 6
2+4+6 = 12
if you sum even numbers, starting from 0, "10" is not a possible result. i dont know what youre trying to do there.
So it skips 10...
if you do sum(range(0,10,2)), 10 isn't reached either.
why are we having this discussion?
[j2 for j in range(0, (11+1)/2)]
Your code is wrong.
sum(range(0,11,2)) works as expected, [j*2 for j in range(0, (11)/2)] does not.
You seem like you have issues.