# 方法一
print(sum(range(1,100)[::2]))
# 2500
# 方法二
x = [i for i in range(1,100) if i % 2 == 1 ]
print(sum(x))
# 2450
2020-04-19
# 方法一
print(sum(range(1,100)[::2]))
# 2500
# 方法二
x = [i for i in range(1,100) if i % 2 == 1 ]
print(sum(x))
# 2450
2020-04-19