input: Write a function to convert ratings in a list of strings to a float. The function should iterate through each string in the list, convert it to a float, and return a list of these 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(['0.0', '1.5', '3.75'])==[0.0, 1.5, 3.75]
  assert str_to_float(['2.1', '2.2', '2.3'])==[2.1, 2.2, 2.3]
  assert str_to_float([])==[]
  assert str_to_float(['1'])==[1.0]
output: def str_to_float(ratings):
      return [float(rating) for rating in ratings]