Write a function that gets a sequence and value and returns `true/false` depending on whether the variable exists in a multidimentional sequence.

Example:
```
locate(['a','b',['c','d',['e']]],'e'); // should return true
locate(['a','b',['c','d',['e']]],'a'); // should return true
locate(['a','b',['c','d',['e']]],'f'); // should return false
```

Difficulty: introductory

Starter code:

def locate(seq, value):
	

Solutions:
def locate(seq, value): 
    for s in seq:
        if s == value or (isinstance(s,list) and locate(s, value)): 
            return True
    return False

def locate(seq, value): 
    f = 0
    for e in seq:
        if type(e) == list and not f:
            f = locate(e, value)
        elif e == value:
            f = 1
    return f


def flatten(seq):
    for e in seq:
        if isinstance(e, list):
            yield from flatten(e)
        yield e


def locate(seq, value): 
    return any(e == value for e in flatten(seq))

def locate(arr, item):
    return item in arr or any(isinstance(e, (list, tuple)) and locate(e, item) for e in arr)

def locate(seq, value):
    if isinstance(seq, (tuple, list)):
        return any(locate(x, value) for x in seq)
    return seq == value

def locate(seq, value): 
    # initialize
    clean = []
    return value in unfold(clean, seq)
    
def unfold(clean, seq):
    '''transform seq into 1d array''' 
    for s in seq:
        if type(s) == str:
            clean.append(s)
        else:
            clean=list(set(unfold(clean, s)))
    return clean

def locate(seq, v): 
    return any(s for s in seq if s == v or isinstance(s, list) and locate(s, v))


def locate(seq, value): 
    for x in seq:
        if x == value:
            return True
        if isinstance(x, list):
            if locate(x, value) == True:
                return True
    return False

locate=l=lambda a,x:any(l(e,x)if[]==e*0else e==x for e in a)

def locate(seq, value):
    queue = [e for e in seq]
      
    while len(queue):
        el = queue.pop(0)
        if type(el) is list:
            queue = queue + el
        elif el == value:
            return True
    
    return False