input: Write a function to return every other element from a given list.
  assert alternating_elements([1, 2, 3, 4, 5, 6]) == [1, 3, 5]
  assert alternating_elements([10, 20, 30, 40, 50]) == [10, 30, 50]
  assert alternating_elements(['a', 'b', 'c', 'd', 'e']) == ['a', 'c', 'e']
output: def alternating_elements(lst):
      return lst[::2]