Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Speedy category for Multicolored Lamp by Ylliw
colors=["Green","Red","Blue","Yellow"]
class Lamp:
def __init__(self):
self.color=-1
def light(self):
self.color=(self.color+1)%4
return colors[self.color]
Jan. 15, 2019