What should be the pythonic way to implement following logic?
<p>I would like to loop a list and remove element if it meets the requirement. At the same time, I would transform the removed element and add the transformation result to another list. </p>

<p>Right now, I have implemented above logic by following code:</p>

<pre><code>delete_set = set([])

for item in my_list:
   if meet_requirement(item):
      another_list.append = transform(item)
      delete_set.add(item)

my_list = filter(lambda x:x not in delete_set, my_list)
</code></pre>

<p>The code is not so straight-forward, is there a better way to implement the logic?</p>
