Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Multicolored Lamp by cerankas
from itertools import cycle
class Lamp:
def __init__(self) -> None:
self.iter = cycle(['Green', 'Red', 'Blue', 'Yellow'])
def light(self):
return next(self.iter)
Sept. 16, 2023
Comments: