title: How to print multiple list become one list in Python
body: <p>I have this code:
  the newlist is: [4,5,6,7,8]</p>
  <pre><code>    for i in newlist:
          ...:     if i &lt; 7:
          ...:         x = [i]
          ...:         print (x)
          ...:         
      [4]
      [5]
      [6]
  </code></pre>
  <p>I want to have an output like this :
  [4,5,6]</p>
  <p>What's wrong with my code?</p>