<filename>1480-running-sum-of-1d-array/1480-running-sum-of-1d-array.py
class Solution:
    def runningSum(self, nums: List[int]) -> List[int]:
        result = []
        for i in range(len(nums) + 1):
            if nums[:i]:
                result.append(sum(nums[:i]))
        return result
<filename>1480-running-sum-of-1d-array/1480-running-sum-of-1d-array.py
class Solution:
    def runningSum(self, nums: List[int]) -> List[int]:
        result = []
        for i in range(len(nums) + 1):
            if nums[:i]:
                result.append(sum(nums[:i]))
        return result