Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
series[1][2] = 3 val = 7
我怎样才能加到val10 ? series[1][2]series[1][2]
val
series[1][2]
series[1][2] += val
应该做的伎俩。
有什么问题:
series[1][2]+=val
如果您想将值存储在不同的变量中,那么您可以这样做:
x = (series[1][2] + val)
否则 series[1][2] += val ,如果您想在求和后追加,那么您的工作会很好。