<pre><code>a = map(int, raw_input().split())
n = len(a)
for i in range(0, n):
start_sum = sum(a[0:i+1]) # to calculate sum of first i
last_sum = sum(a[-(n-i):]) # to calculate sum of last n-i
</code></pre>
<p>现在我必须存储<strong>开始和<strong>最后和<strong>的和,并将其存储在<strong>新列表b</strong>中,索引与<strong>I</strong>相同</p>
<pre><code>b[i] = start_sum + last_sum
</code></pre>
<p>如何实现这一点。我对Python还不熟悉。任何帮助都会很好。你知道吗</p>