Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Multicolored Lamp by wbl4126
class Lamp:
def __init__(self):
self.ind = -1
def light(self):
self.ind = (self.ind + 1) % 4
return ['Green', 'Red', 'Blue', 'Yellow'][self.ind]
March 9, 2020