Can someone explain this interaction between `zip` and `tee` from itertools?
From my understanding, tee
is supposed to make independent copies of an iterator, each of which can be exhausted individually. However, when exhausting the teed copies, sometimes the original iterator is intact, and at other times (e.g., when zip
is involved), it is exhausted instead. Why is this happening? Am I missing some nuance in the semantics of tee
and zip
?