input: Write a function to suggest an improvement for the given Python code that calculates the sum of elements in a list. The original code uses a for loop to iterate through the list and accumulate the sum. The improved version should use a more efficient method to achieve the same result.
  
  ### Input:
  def sum_elements(arr):
      sum_value = 0
      for num in arr:
          sum_value += num
      return sum_value
  
  ### Output:
  def sum_elements(arr):
      return sum(arr) # return sum of elements of arr with one line of code.
  
  assert sum_elements([1, 2, 3, 4]) == 10
  assert sum_elements([5, -3, 8, 12]) == 22
  assert sum_elements([]) == 0
  assert sum_elements([-1, -2, -3, -4]) == -10
  assert sum_elements([0, 0, 0, 0]) == 0
output: def sum_elements(arr):
      return sum(arr)