input: Write a function to convert ratings in a list of strings to a float.
  def str_to_float(ratings):
      return [float(x) for x in ratings]
  assert str_to_float(['4.5', '3.0', '2.5', '4.0'])==[4.5, 3.0, 2.5, 4.0]
  assert str_to_float([])==[]
  assert str_to_float(['0.0', '1.0', '5.0'])==[0.0, 1.0, 5.0]
  assert str_to_float(['3.1', '2.9', '4.7'])==[3.1, 2.9, 4.7]
  assert str_to_float(['1.5'])==[1.5]
output: def str_to_float(ratings):
      return [float(x) for x in ratings]