I’m trying to recurse over a list (eg. [True, [[True, False], [False, [False, True]]]]) using Python. I know that the list length will always be 2 and both values will be boolean. I’d like to take those values and substitute them back into the list until there are only 2 values left (or 1 boolean value). Any help would be much appreciated.
I’m trying to recurse over a list (eg. [True, [[True, False], [False, [False, True]]]])
Share
You haven’t said how to combine the two parts, so I’m assuming
orbut you could use another function instead.