title: How to remove a string from a list that startswith prefix in python
body: <p>I have this list of strings and some prefixes. I want to remove all the strings from the list that start with any of these prefixes. I tried:</p>
  
  <pre><code>prefixes = ('hello', 'bye')
  list = ['hi', 'helloyou', 'holla', 'byeyou', 'hellooooo']
  for word in list:
      list.remove(word.startswith(prexixes)
  </code></pre>
  
  <p>So I want my new list to be:</p>
  
  <pre><code>list = ['hi', 'holla']
  </code></pre>
  
  <p>but I get this error:</p>
  
  <pre><code>ValueError: list.remove(x): x not in list
  </code></pre>
  
  <p>What's going wrong?</p>