input: Write a function to find the common elements in two given lists. The function should return a list containing all elements that are present in both lists. The function should take two lists as input and return a list of common elements.
  
  
  def find_common_elements(list1, list2):
      common_elements = []
      for i in list1:
          if i in list2:
              common_elements.append(i)
      return common_elements
  
  assert find_common_elements([3, 9, 15, 21, 27], [21, 7, 13, 29, 31]) == [21]
  assert find_common_elements([1, 2, 3, 4, 5], [4, 5, 6, 7, 8]) == [4, 5]
  assert find_common_elements([10, 20, 30], [30, 40, 50]) == [30]
  assert find_common_elements([], [1, 2, 3]) == []
  assert find_common_elements([1, 2, 3], []) == []
  
output: def find_common_elements(list1, list2):
      common_elements = []
      for i in list1:
          if i in list2:
              common_elements.append(i)
      return common_elements