This comment is hidden because it contains spoiler information about the solution
why can't we mutate the input? I tested the code outside of codewars and it worked fine, but I get errors for all the results based on the tests.
based
I don't really understand the need for the isinstance(i, bool) thing. Is it accounting for some contingency I'm not thinking of?
Loading collection data...
This comment is hidden because it contains spoiler information about the solution
why can't we mutate the input? I tested the code outside of codewars and it worked fine, but I get errors for all the results based on the tests.
based
I don't really understand the need for the isinstance(i, bool) thing. Is it accounting for some contingency I'm not thinking of?