Lazy Eval and Parallel Processing in Python!

You seem to be making some of the same mistakes as your previous post

Namely, the line Q = set(Q) doesn’t do anything. Python sets can’t be put into each other because they are mutable and therefore non-hashable. Perhaps you mean to use frozensets.

>>> ZERO = frozenset()
>>> Q = ZERO
>>> L = [ZERO]
>>> for i in range(5):
...     Q = frozenset({Q})
...     L.append(Q)
... 
...     
>>> L
[frozenset(), frozenset({frozenset()}), frozenset({frozenset({frozenset()})}), frozenset({frozenset({frozenset({frozenset()})})}), frozenset({frozenset({frozenset({frozenset({frozenset()})})})}), frozenset({frozenset({frozenset({frozenset({frozenset({frozenset()})})})})})]