input: Write a function to convert ratings in a list of strings to a float. Write a response that appropriately completes the request.
  
  ### Instruction:
  Write a Python program to convert ratings in a list of strings to a float.
  
  ### Input:
  ['4.5', '3.0', '2.5', '4.0']
  
  ### Output:
  def str_to_float(ratings):
      return [float(x) for x in ratings]
output: def str_to_float(ratings):
      return [float(x) for x in ratings]