input: Write a function to convert ratings in a list of strings to a float. The function should take a list of string ratings and return a list of floats.
  assert str_to_float(['4.5', '3.0', '2.5', '4.0'])==[4.5, 3.0, 2.5, 4.0]
  assert str_to_float(['3.75', '2.8'])==[3.75, 2.8]
  assert str_to_float(['5.0', '4.9', '4.8'])==[5.0, 4.9, 4.8]
  assert str_to_float([])==[]
output: def str_to_float(ratings):
      return [float(rating) for rating in ratings]