input: Write a function to convert ratings in a list of strings to a float type. Return a list containing the converted float values.
  assert str_to_float(['4.5', '3.0', '2.5', '4.0'])==[4.5, 3.0, 2.5, 4.0]
  assert str_to_float(['5', '3.7', '4.2'])==[5.0, 3.7, 4.2]
  assert str_to_float(['0.5', '1.0', '2.0', '0.0'])==[0.5, 1.0, 2.0, 0.0]
  assert str_to_float(['1', '2', '3', '4'])==[1.0, 2.0, 3.0, 4.0]
  assert str_to_float([])==[]
output: def str_to_float(ratings):
      return [float(rating) for rating in ratings]