human
Write me a Python code to cumsum on a list in Python.
assistant
Here is a Python code to cumsum on a list

import math

def cumsum(l):
    """
    :param list l: list to be cumsummed
    :return: cumsummed list
    :rtype: list
    """
    return list([x + sum(l[:x]) for x in range(len(l))])

# Enter the list
list1 = [1, 2, 3]

# Calling the function
print((cumsum(list1)))

#Example Output
# [0, 2, 5]

#Remember to inspect code for bugs.