I'm using Python 3.6.1 and got into an interesting issue:
I'm using a simple itertools.filter() to get a sub-list from an
items = [1,2,3,4,5]
operateVersions = filter(lambda t: t, items)
print ("1: %s" % list(operateVersions))
print ("2: %s" % list(operateVersions))
1: [1, 2, 3, 4, 5]
A filter is a special iterable object, and like a generator, you can only iterate over it once. So essentially it returns an empty list when you run it a second time.