#31769: [Python]List Comprehension With Mathematical Sense


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

學校 : 國立交通大學
編號 : 139794
來源 : [140.113.236.122]
最後登入時間 :
2022-09-03 11:13:16

Σ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))