【发布时间】:2016-01-14 15:53:07
【问题描述】:
让我们这么说:
print var
8
10
2
>>>
如何将变量内的数字相加?
【问题讨论】:
-
那个变量是什么类型的?列表?
-
您好,欢迎来到 StackOverflow。请花一些时间阅读帮助页面,尤其是名为"What topics can I ask about here?" 和"What types of questions should I avoid asking?" 的部分。更重要的是,请阅读the Stack Overflow question checklist。您可能还想了解Minimal, Complete, and Verifiable Examples。
-
总和(变量)。您尝试过/阅读过/研究过什么?
标签: python list variables numbers add