A nested list (or *array* in JavaScript) is a list that apears as a value inside another list, 
```python
[item, item, [item, item], item]
```
in the above list, [item, item] is a nested list.  
  
Your goal is to write a function that determines the depth of the deepest nested list within a given list.  
return 1 if there are no nested lists.
The list passed to your function can contain any data types.  
  
A few examples:

```python
list_depth([True])
return 1

list_depth([])
return 1

list_depth([2, "yes", [True, False]])
return 2

list_depth([1, [2, [3, [4, [5, [6], 5], 4], 3], 2], 1])
return 6

list_depth([2.0, [2, 0], 3.7, [3, 7], 6.7, [6, 7]])
return 2
```

Difficulty: introductory

Starter code:

def list_depth(l):
	

Solutions:
def list_depth(l):
    depths = [1]
    for x in l:
        if isinstance(x, list):
            depths.append(list_depth(x) + 1)
    return max(depths)

def list_depth(lst):
    result = [list_depth(a) for a in lst if isinstance(a, list)]
    return 1 + max(result) if result else 1


def list_depth(l):
    if l == []:
        return 1
    if isinstance(l, list):
        return 1 + max(list_depth(item) for item in l)
    else:
        return 0

def list_depth(l):
    return max((1+list_depth(x) for x in l if isinstance(x, (list, tuple))), default=1)

def list_depth(L):

    dep = []
    
    if type(L) is not list:
        return 0
    elif len(L) == 0:
        return 1
    else:
        for x in L:
            dep.append(list_depth(x))
        print(dep)
    return 1 + max(dep)


def list_depth(xs, depth=0):
    if isinstance(xs, list):
        return max((list_depth(x, depth + 1) for x in xs), default=depth + 1)
    return depth

def list_depth(l):
  return max(1 + list_depth(x) if type(x) is list else 1 for x in l) if l else 1

def list_depth(l):
    return (1 + max((list_depth(item) for item in l), default=0)) if type(l) == list else 0


def list_depth(l):
  inds = [i for i, v in enumerate(l) if isinstance(v, list)]
  return 1 if len(inds) == 0 else 1 + max(list_depth(l[i]) for i in inds)

def list_depth(l):
    return 0 if not isinstance(l, list) else 1 + max(list_depth(x) for x in l) if l else 1


list_depth=d=lambda l:type(l)==type([])and-~max(map(d,l+[0]))

def list_depth(l, f=1):
    return max(f if not isinstance(x, list) else list_depth(x, f + 1) for x in l) if l else f

def list_depth(l, depth=1):
    max_depth = depth
    for e in l:
        if type(e) is list:
            max_depth = max(max_depth, list_depth(e, depth+1))
    return max_depth

def list_depth(l):
    temp=list(filter(lambda x:x in ('[',']'),str(l)))
    while temp[-1]==']':
        temp.pop()
    return temp.count('[')-temp.count(']')

def list_depth(l):
    a = str(l)
    z = 0
    for i in a[::-1]:
        if i == "]":
            z += 1
        elif i == "[":
            break

    return z

def list_depth(l):
    try:
        return isinstance(l, list) and max(map(list_depth, l)) + 1
    except:
        return 1

def list_depth(L):
    try : return 1 + max(list_depth(e) for e in L if isinstance(e, list))
    except : return 1

def list_depth(l):
    depths = [1]
    for elm in l:
        if isinstance(elm, list):
            depths.append(list_depth(elm) + 1)
    return max(depths)

def list_depth(l):
    a=[0]
    for i in str(l):
        if i=='[': a.append(a[-1]+1)
        if i==']': a.append(a[-1]-1)
    return max(a)