input: Write a python function to convert a list of RGB values to HSL values.
  assert RGB_to_HSL([(255, 0, 0), (0, 255, 0), (0, 0, 255)]) == [[0.0, 1.0, 0.5], [120.0, 1.0, 0.5], [240.0, 1.0, 0.5]]
  assert RGB_to_HSL([(255, 255, 255), (0, 0, 0), (128, 128, 128)]) == [[0.0, 0.0, 1.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.5019607843137255]]
  assert RGB_to_HSL([(255, 165, 0), (75, 0, 130), (238, 130, 238)]) == [[39.130434782608695, 1.0, 0.5], [274.6153846153846, 1.0, 0.2549019607843137], [300.0, 0.8695652173913043, 0.7215686274509804]]
output: def RGB_to_HSL(rgb_list):
      def rgb_to_hsl(r, g, b):
          r /= 255.0
          g /= 255.0
          b /= 255.0
  
          max_c = max(r, g, b)
          min_c = min(r, g, b)
          l = (max_c + min_c) / 2.0
  
          if max_c == min_c:
              h = s = 0.0
          else:
              d = max_c - min_c
              s = d / (2.0 - max_c - min_c) if l > 0.5 else d / (max_c + min_c)
              if max_c == r:
                  h = (g - b) / d + (6 if g < b else 0)
              elif max_c == g:
                  h = (b - r) / d + 2
              elif max_c == b:
                  h = (r - g) / d + 4
              h /= 6
  
          return [h * 360, s, l]
  
      return [rgb_to_hsl(r, g, b) for r, g, b in rgb_list]