title: How can I remove all occurrences of one number in a list in Python
body: <p>Just joined to ask this question as I cannot find it for the life of me on Google.</p>
  
  <p>Say I have a list <code>x = [1,1,1,2,3,3,4,5,5,5,6,7]</code></p>
  
  <p>How can I remove all instances of the number <code>1</code> without deleting the index one by one?</p>
  
  <p>tried <code>del</code> &amp; <code>remove</code> but cannot seem to fathom it out.</p>
  
  <p>Essentially what I am doing is counting all the occurrences of one number then removing it from my list.</p>
  
  <p>ps. Cannot use: <a href="https://stackoverflow.com/questions/1157106/remove-all-occurrences-of-a-value-from-a-list">Remove all occurrences of a value from a list?</a> as <code>lambda</code> isn't covered in our course. </p>
  
  <p>I am not looking for code review so ignore some of my methods, just want to see if theres a way I can do this.</p>
  
  <hr>
  
  <p>Edit: Thanks all, managed to get what I was after and complete my code. I've taken my code out just in case I am not allowed to post it on here.</p>