def FindAll(haystack, needle):
    r = []
    if isinstance(haystack, str):
        index = haystack.find(needle)
        while True:
            if ~index:
                r += [index]
            else:
                return r
            index = haystack.find(needle, index + 1)
    else:
        return [i for i, item in (haystack.items() if isinstance(haystack, dict) else enumerate(haystack)) if item == needle]