Create a function in Python that takes a list of numbers and returns the cumulative sum.
1, 2, 3
def cum_sum(lst):
 result = []
 cumulative = 0
 for num in lst:
  cumulative += num
  result.append(cumulative)
 return result