input: Write a function that takes a list of integers and returns the sum of all elements divisible by 3.
  
  
  def divisibleBy3(li):
      total = 0
      for num in li:
          if num % 3 == 0:
              total += num
      return total
  
  # Test cases
  assert divisibleBy3([4, 6, 17, 24, 5, 9]) == 39
  assert divisibleBy3([3, 6, 9, 12]) == 30
  assert divisibleBy3([1, 2, 4, 5]) == 0
  assert divisibleBy3([]) == 0
  
output: def divisibleBy3(li):
      total = 0
      for num in li:
          if num % 3 == 0:
              total += num
      return total