|
|
1
2
不使用itertools的一种方法是使用python的
|
|
|
2
4
使用ITertools中的累积:
|
|
|
3
1
你需要一个累积和,只需要列表。
|
|
4
1
您还可以创建一个简单的列表理解:
|