How Deep How Deep
Simple
English RU

You are given a tuple that consists of integers and other tuples, which in turn can also contain tuples.

Your task is to find out how deep this structure is or how deep the nesting of these tuples is.

For example, in the (1, 2, 3) tuple the depth...

It’s important to note that an empty tuple also increases the depth of the structure, that is, () - indicates the nesting depth 1, ((),) - indicates the nesting depth 2.

Tuple of tuple of tuple...

Int.

how_deep((1, 2, 3)) == 1
how_deep((1, 2, (3,))) == 2

Given iterables have to be well founded.

You should be an authorized user in order to see the full description and start solving this mission.