File size: 143 Bytes
e16247a
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
a=3
b=2
c=1
f = [a,b,c]
#sum函数是对列表,元组等可迭代对象内的所有值求和
#错误写法:d = sum(a,b,c)
d=sum(f)
print(d)