input: from typing import List
  
  def divisibleBy3(li: List[int]) -> int:
      """
      A simple Python function that takes a list of integers and returns the sum of all elements divisible by 3.
      
      >>> divisibleBy3([4, 6, 17, 24, 5, 9])
      42
      """
output:     total = 0
      for num in li:
          if num % 3 == 0:
              total += num
      return total