title: I need to create a function that filters a list without a for loop
body: <p>so my function needs to filter a list so that it returns a list of only the values that return a positive value when a function is applied to it without the use of any loops. My code is currently:</p>
  
  <pre><code>def positive_places(f, xs):
      """takes a function f and list xs and returns
      a list of the values of xs which satisfy
      f&gt;0"""
      y = list(map(f, xs))
      x = filter(lambda i: i &gt; 0, y)
      return x
  </code></pre>
  
  <p>This currently returns a list of all the positive output values of the function, however I need their corresponding values from the original list xs.</p>
  
  <p>Thanks for any help in advance!</p>