The itertools module provide a number of useful functions for working with iterables through iterators.

The tee() function  in the module creates a number of iterators for the specified iterable object. Essentially, the function creates a tuple of n independent iterators from a single iterable.

Syntax:
tee(iterable, n = 2)
copy
iterable Required. The iterable to create the iterators for.
n Optional. The number of independent iterators to create. Defaults to 2.
Parameters:

The function returns a tuple of n independent iterators.

ExampleEdit & Run
#import the tee function 

from itertools import tee

data = [0, 2, 4, 6, 8, 10]

#create two iterators for data
its = tee(data)

print(its)
for i in its:
   print(*i)
copy
Output:
(<itertools._tee object at 0x7f07e9303e80>, <itertools._tee object at 0x7f07e9319e00>) 0 2 4 6 8 10 0 2 4 6 8 10 [Finished in 0.010566151235252619s]

In the following example a non-default parameter n is given. 

ExampleEdit & Run
#import the tee function 

from itertools import tee

data = ['Python', 'Java', 'C++']

#create two iterators for data
its = tee(data, 4)
for i in its:
   print(*i)
copy
Output:
Python Java C++ Python Java C++ Python Java C++ Python Java C++ [Finished in 0.01040289318189025s]