import itertools, copy cyc1 = itertools.cycle([1, 2])cyc2 = copy.copy(cyc1)print(next(cyc1), next(cyc2))
Standard input is empty
1 2
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!