If I have a list "abbabaabbaba" and I want to find the ordered occurences of some substrings "ab", "bb", I can do multiple .find() calls like this:

```
def foo(string, substrings):
    tuples = []
    for substring in substrings:
        string_copy = string
        while string_copy.find(substring) != -1:
            index = string_copy.find(substring)
            string_copy = string_copy[index:]
            tuples.append((index, substring))
    return sorted(tuples)

```

but is there possibly a shorter way? Something like: 

```
def bar(string, substring):
    return ((index, substring) for substring in string.find(substring) if index != -1)

```

(but works)

Example:  

`foo("abbabaabbaba", ["ab", "bb])`  

`>>> [(0, "ab"), (1, "bb"), (3, "ab"), (6, "ab"), (7, "bb"), (9, "ab")]`