code: def find_range(coeffs):
      '''
      Find the range in a list of coefficients where the coefficient is nonzero
      '''
  
      coeffs = [float(x) != 0 for x in coeffs]
      first = coeffs.index(True)
      coeffs.reverse()
      last = len(coeffs) - coeffs.index(True) - 1
      return first, lasf find_range(coeffs):
      '''
      Find the range in a list of coefficients where the coefficient is nonzero
      '''
  
      coeffs = [float(x) != 0 for x in coeffs]
      first = coeffs.index(True)
      coeffs.reverse()
      last = len(coeffs) - coeffs.index(True) - 1
      return first, last
docs: Find the range in a list of coefficients where the coefficient is nonzero