#31769: [Python]List Comprehension With Mathematical Sense


406490150@gms.tku.edu.tw (我是朱朱)


Σx2 from x=1 to x=1023     =    Σx2  ∀ x ∈ {1, 2, ... ,1023}   =   sum x2 for every x in {1, 2, ... ,1023}

Σ讀作summation.

Therefore,

sum(x^2 for x in range(1, 1024))