input: def sort_every_third(l: list):
      """This function receives a list l and returns a list l' where l' remains the same for indices not divisible by three. However, elements at positions divisible by three are replaced by sorted values from the original list.
      >>> sort_every_third([1, 2, 3])
      [1, 2, 3]
      >>> sort_every_third([5, 6, 3, 4, 8, 9, 2])
      [2, 6, 3, 4, 8, 9, 5]
      """
output:     third_elements = [l[i] for i in range(0, len(l), 3)]
      third_elements_sorted = sorted(third_elements)
      
      result = l[:]
      for i, value in enumerate(third_elements_sorted):
          result[i * 3] = value
      
      return result