Create a Python function to calculate the sum of the list elements.
[1, 3, 4, 7, 9]
def list_sum(list_in):
 return sum(list_in)

# or
def list_sum(list_in):
 total_sum = 0
 
 for num in list_in:
 total_sum += num
 
 return total_sum