title: How to get N inputs from user in python
body: <p>In my case i have to get N no. of inputs from user as per they entered. i mean,</p>
  
  <pre><code>Please enter size of an array:
  </code></pre>
  
  <p>and if the user enter 3 or whatever as he like, then the program should take 3 inputs from the user in a single line like</p>
  
  <pre><code>1 2 3
  </code></pre>
  
  <p>and also if he enters greater than 3 or what he enters the program should warn him about the input he given.</p>
  
  <p>is there any way to do????</p>
  
  <p>my inputs are:</p>
  
  <pre><code>Enter size of an array : 5
  </code></pre>
  
  <p>my outputs should be like this:</p>
  
  <pre><code>1 2 3 4 5
  </code></pre>
  
  <p>and the main thing is that.......... it should not ask user each and every time to enter 5 input and also it should check that the user entered correct no. of inputs.</p>
  
  <p>PS: please dont mark this as "Duplicate". I searched a lot and found no answer. that's why asking here.</p>