Given a list of integers, write a function to return the sum of the first and last elements in the list. If the list is empty, return 0.
[1, 2, 3, 4, 5]
6
Bot