In Python, you can get the sum of all integers in a list by using the sum method: sum = sum([1, 2, 3, 4, 5]) print(sum) # 15.
確定! 回上一頁