Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Rename and reuse solution in Clear category for Multicolored Lamp by veky
from itertools import cycle
class Lamp(cycle):
__new__ = lambda cls: cycle.__new__(cls, 'Green Red Blue Yellow'.split())
light = cycle.__next__
June 13, 2018
Comments: