input: Write a function to find the common elements in two lists and return them as a list. The function should take two lists as input and use a nested loop to compare elements between the two lists. If an element is found in both lists, it should be added to the result list. If there are no common elements, the result list should be empty.
  assert find_common_elements([3, 9, 15, 21, 27], [21, 7, 13, 29, 31])==[21]
  assert find_common_elements([1, 2, 3], [4, 5, 6])==[]
  assert find_common_elements([1, 2, 3], [3, 2, 1])==[1, 2, 3]
  assert find_common_elements([], [1, 2, 3])==[]
  assert find_common_elements([], [])==[]
output: def find_common_elements(list1, list2):
      result = []
      for elem1 in list1:
          for elem2 in list2:
              if elem1 == elem2 and elem1 not in result:
                  result.append(elem1)
      return result