Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for How Deep by takimoto0223
def how_deep(k):
if not k:
return 1
else:
if isinstance(k, tuple):
return 1 + max(how_deep(i) for i in k)
else:
return 0
May 24, 2020
Comments: