使用python编程,求1到20间所有奇数的和

如题所述

第1个回答  2021-05-14
x_ls =[i for i in range(1,20,2)]
print(sum(x_ls))
#100 包含了1