title: String to list of certain characters
body: <p>So I am working in Python and I would like to turn a string into a list of characters</p>
  
  <p><code>VALID_SYMBOLS</code> is a list of characters and <code>EMPTY_SYMBOL</code> is a dash.</p>
  
  <p>I would like to loop over each element in <code>symbols</code> and if it is valid, keep it and if it is invalid then turn it into <code>EMPTY_SYMBOL</code>, but I am getting an error at the <code>else</code>:</p>
  
  <pre><code>symbols = list(line)
  symbols = [x for x in symbols if any(x == y for y in VALID_SYMBOLS) else EMPTY_SYMBOL]
  </code></pre>
  
  <p>Is there a more Pythonic way to do this?</p>