I have a generator function that yields the power set of a list. I put some print statements in it, but when I run the project none of them print anything. If I write a function that just prints 'test' it works however. Could someone please help?
def powerSet(items):
print 'test'
N = len(items)
print N
for i in range(2**N):
combo = []
for j in range(N):
if (i >> j) % 2 == 1:
combo.append(items[j])
print combo
yield combo
list = ['a', 'b', 'c']
powerSet(list)