title: Conversion of the outputs of a for loop into an array
body: <p>I am learning Python and coding in general and here's something I stumbled upon:</p>
  
  <pre><code>n=int(input())
  for i in range(1,n+1):
         print(i)
  </code></pre>
  
  <p>Now, I want the output in the form of an array. So if <code>n=4</code>, I want the output to look like <code>my_array = [1,2,3,4]</code>.</p>
  
  <p>How can I do that?</p>