input: Write a function to improve the given Python code for finding the sum of elements of a list. The function should return the sum using a single line of code. If the given list is empty, it should return 0.
  assert sum_elements([1, 2, 3])==6
  assert sum_elements([4, 5, 6])==15
  assert sum_elements([1, 1, 1, 1])==4
  assert sum_elements([])==0
  assert sum_elements([0, 0, 0])==0
output: def sum_elements(lst):
      return sum(lst) if lst else 0