Define a function render_lights that consumes a list of list of booleans and produces a single string. The 2D list of booleans represents a grid of lights that are either on (True) or off (False). Your resulting string is going to be a sequence of two possible emoji ("ā¬" or "š”"), with each new row of the characters being separated by a newline. So for example:
[ [ False, False, True, False],
[ False, True, True, False],
[ False, True, True, True] ]
Would become "ā¬ā¬š”ā¬\nā¬š”š”ā¬\nā¬š”š”š”\n". An empty list becomes an empty string ("").
Hint: This is actually a fairly straightforward application of the Nested Accumulate pattern that was demonstrated in this chapter, only instead of adding numbers we are adding strings based on boolean values.