a=[1,2,3,4,5,6,7,8,9,10]
#连加
b=0
for i in a:
b+=i
print(b)
#连乘
c=1
c*=i
print(c)
python3 连加 连乘 代码
原文:https://www.cnblogs.com/kzkzkz/p/10328039.html