Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
from itertools import cycle, islice colors = cycle(["red", "green", "blue"]) for color in islice(colors, 7): print(color)
Result
Open