title: how to use for loop with numpy array?
body: <p>i have a part of code like this</p>
  
  <pre><code>#predicitng values one by one 
  regr = linear_model.LinearRegression()
  predicted_value = np.array([ 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32])
  predicted_value =  predicted_value.reshape(-1,1)
  
  
  #mt
  regr.fit(x, y)
  predicted_values = regr.predict(predicted_value)
  predict_outcome = regr.predict(predicted_value)
  predictions = {'predicted_value': predict_outcome}
  mmt = np.mean(predict_outcome)
  
  #ht
  regr.fit(x, ht)
  predicted_values = regr.predict(predicted_value)
  predict_outcome = regr.predict(predicted_value)
  predictions = {'predicted_value': predict_outcome}
  mht = np.mean(predict_outcome)
  </code></pre>
  
  <p>here instead of this :</p>
  
  <pre><code>predicted_value = np.array([ 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32])
  </code></pre>
  
  <p>how can i set a range from 9 to 32(or x to y) so that i can avoid typing all numbers.if it is done using for loop how to apply it in this context</p>