def findall(sub, string):
    """
    >>> text = "Allowed Hello Hollow"
    >>> tuple(findall('ll', text))
    (1, 10, 16)
    """
    index = 0 - len(sub)
    o = []
    if not sub in string:
        return []
    while True:
        try:
            index = string.index(sub, index + len(sub))
        except:
            break
        o.append(index)
    return o
    #except ValueError:
    #        pass