title: How to use the filter function to identify the index of special characters
body: <p>I am trying to use a generator function of sorts (I think I need to use the filter generator) to identify the index location of the special characters in a string (in Python 3.7)</p>
  
  <p>Using "extended" code I can write it as follows</p>
  
  <pre><code>string = "4+10*3"
  for (index,char) in enumerate(string):
      if char in ["*", "+"]: print (index)
  </code></pre>
  
  <p>I am struggling to get my generator expression to work. This is what I wrote:</p>
  
  <pre><code>filter(lambda i: index for (index,char) in enumerate(string) in ["*", "+"], string)
  </code></pre>
  
  <p>I know this is not really a useful thing to be able to do, but I want to see if its possible as I've just learned about the filter function and thought it'd be interesting to see if its possible. </p>
  
  <p>Thanks</p>