input: Write a python function to convert RGB values to HSL values.
  assert rgb2hsl(0, 10, 240) == (240.0, 1.0, 0.47058823529411764)
  assert rgb2hsl(255, 0, 0) == (0.0, 1.0, 0.5)
  assert rgb2hsl(0, 255, 0) == (120.0, 1.0, 0.5)
  assert rgb2hsl(0, 0, 255) == (240.0, 1.0, 0.5)
  assert rgb2hsl(255, 255, 255) == (0.0, 0.0, 1.0)
output: def rgb2hsl(r, g, b):
      r, g, b = r / 255.0, g / 255.0, b / 255.0
      max_c, min_c = max(r, g, b), min(r, g, b)
      l = (max_c + min_c) / 2
  
      if max_c == min_c:
          h = s = 0.0
      else:
          d = max_c - min_c
          s = d / (2 - 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
          h *= 360
  
      return h, s, l