Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
deep... solution in Clear category for How Deep by maksimus
def how_deep(struct):
if (type(struct) not in [list, tuple]):
return 0
if len(struct)==0:
return 1
return 1 + max(how_deep(x) for x in struct)
May 24, 2020
Comments: