Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple recursive solution in Clear category for How Deep by tokyoamado
def how_deep(structure):
if type(structure) == int:
return 0
else:
return 1 + max([how_deep(s) for s in structure], default=0)
May 13, 2019