input: Write a function to detect outliers in a list of numbers using the interquartile range (IQR) method.
  assert detect_outliers([10, 12, 14, 15, 18, 21, 22, 23, 100]) == [100]
  assert detect_outliers([1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 50]) == [50]
  assert detect_outliers([10, 10, 10, 10, 10, 10, 10, 11, 12, 30]) == [30]
output: def detect_outliers(data):
      data = sorted(data)
      q1 = data[int(len(data) * 0.25)]
      q3 = data[int(len(data) * 0.75)]
      iqr = q3 - q1
      lower_bound = q1 - 1.5 * iqr
      upper_bound = q3 + 1.5 * iqr
      return [x for x in data if x < lower_bound or x > upper_bound]