title: Printing an int list in a single line python3
body: <p>I'm new to python and I'm trying to scan multiple numbers separated by spaces (let's assume '1 2 3' as an example) in a single line and add it to a list of int. I did it by using:</p>
  <pre><code>#gets the string 
  string = input('Input numbers: ') 
  #converts the string into an array of int, excluding the whitespaces
  array = [int(s) for s in string.split()] 
  </code></pre>
  <p>Apparently it works, since when I type in '1 2 3' and do a <code>print(array)</code> the output is:</p>
  <blockquote>
  <p>[1, 2, 3]</p>
  </blockquote>
  <p>But I want to print it in a single line without the brackets, and with a space in between the numbers, like this:</p>
  <blockquote>
  <p>1 2 3</p>
  </blockquote>
  <p>I've tried doing:</p>
  <pre><code>for i in array:
      print(array[i], end=&quot; &quot;)
  </code></pre>
  <p>But I get an error:</p>
  <blockquote>
  <p>2 3 Traceback (most recent call last):</p>
  <p>print(array[i], end=&quot; &quot;)</p>
  <p>IndexError: list index out of range</p>
  </blockquote>
  <p>How can I print the list of ints (assuming my first two lines of code are right) in a single line, and without the brackets and commas?</p>