Skip to content

Instantly share code, notes, and snippets.

View sammko's full-sized avatar
🅱️

Samuel Čavoj sammko

🅱️
View GitHub Profile
from itertools import product
def lazy_product(*iterables):
iters = [[i.__iter__(), [], False] for i in iterables]
def _p_next(i, il, _):
z = i.__next__()
il.append(z)
return z
s = True