title: For Loop output to variable or to a list in Python
body: <p>I want to assign for loop output values to variables in Python. </p>
  
  <pre><code>onetoten = range(1,5)
  for count in onetoten:
      print (count)
  </code></pre>
  
  <p>The output of above for loop is as below</p>
  
  <pre><code>1
  2
  3
  4
  </code></pre>
  
  <p>I want to assign this output to a list of variables like <code>s1 = 1</code>, <code>s2 = 2</code>, <code>s3 =3</code> and <code>s4 = 4</code>.
  But there is no specific number that the list will be till 4. It may vary based on previous output in the script. So as per output of for loop the number of variable also must increased or based on number of output the variables should be used.  Please help on this.</p>
  
  <p>I asked same type of question earlier where i got a response to use enumerate but this is not exactly python and i am using the script in Jython so i don't have enumerate in Jython.</p>