Skip to content

Instantly share code, notes, and snippets.

@Kush1101
Created Oct 27, 2020
Embed
What would you like to do?
from itertools import tee
iterable = [1, 2, 4, 6, 7, 13]
for i in tee(iterable, 4):
print(list(i))
# OUTPUT
"""
[1, 2, 4, 6, 7, 13]
[1, 2, 4, 6, 7, 13]
[1, 2, 4, 6, 7, 13]
[1, 2, 4, 6, 7, 13]
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment