title: Removing an item and printing the list in one line
body: <p>I was looking for a one-line way to remove an item from a list and then print the list.  The first bit of code works and is straight forward and does what I want:</p>
  <pre><code>alist = [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]
  alist.remove(&quot;b&quot;)
  print(alist)
  </code></pre>
  <p>Which produces the result we want: <code>[&quot;a&quot;, &quot;c&quot;]</code></p>
  <p>But when I tried to make it one line:</p>
  <p><code>print([&quot;a&quot;,&quot;b&quot;,&quot;c&quot;].remove(&quot;b&quot;)) </code></p>
  <p>It returns <code>None</code>.  Can someone explain the difference between these? I have seen <a href="https://stackoverflow.com/questions/38580337/to-remove-an-element-and-assign-the-list-in-one-line">this question</a> but it does not explain why these produce different outputs, and does not really make it all work in one line.</p>
  <p>And this is not actually important for anything, I am just trying to learn what is going on here.  Thanks.</p>