• Incorrect validation of the response


I would like to give some feedback about: I solved this problem a little differently. I'll agree. But my interpreter (PyCharm Community 2020.3) outputs the correct solution, while py.checkio.org says that my solution doesn't allow you to get the right answer.

This is my code:

def how_deep(structure):
structure = list(map(str, structure))
structure.sort(key=lambda x: x.count('['))
return structure[-1].count('[') + 1

From: https://py.checkio.org/mission/how-deep/solve/


Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.185 YaBrowser/ Yowser/2.5 Safari/537.36