Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Rename and reuse readable solution in Clear category for Multicolored Lamp by veky
import itertools
class Lamp(itertools.cycle):
colors = 'Green', 'Red', 'Blue', 'Yellow'
def __new__(cls): return super().__new__(cls, cls.colors)
def light(self): return next(self)
Oct. 12, 2018
Comments: