Count overlapping substrings
First things first, make this a function.
If you then add a doctest to the function you can test if it works correctly, without having to change the code.
This is good, as it also describes how to use it to your users.
Whilst this is a homework assignment, but it's better to get used to using these things.

At the moment you should have the following code.
The import doctest is so that you don't have to use the command line to test the code.
This is good if you don't know how to use the command line or if there are problems with Python and the system PATH.

def overlapping_count(s, seek):
    """
    &gt;&gt;&gt; overlapping_count('azcbobobegghakl', 'bob')
    2
    &gt;&gt;&gt; overlapping_count('auoeunbobnoeubobob,ntonethbobobo', 'bob')
    5
    """
    matches = 0
    # Rest of code...
    return matches

if __name__ == "__main__":
    import doctest
    doctest.testmod()




The biggest improvement in clarity that you can make with the code you have is to use slicing.
Python allows you to index from a beginning to an end of a sliceable object.
To use this is quite simple.

&gt;&gt;&gt; s = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
&gt;&gt;&gt; s[0]
'L'
&gt;&gt;&gt; s[1]
'o'
&gt;&gt;&gt; s[0:1]
'L'
&gt;&gt;&gt; s[0:5]
'Lorem'


As you can probably guess, using this for your match check will greatly decrease the amount of lines, and clarity.
Now the inside of your for-loop can be:

if s[i] == seek[0]:
    if s[i:i + len(seek)] == seek:
        matches += 1




If you use some (premature?) optimizations, you can make your code faster.
It keeps roughly the same amount of complexity in the function.
But mostly, you don't want to waste CPU cycles on things you can remember.
Therefore you would want to store both len(seek) and seek[0] in variables.
Finally enumerate can add a small speed boost to the function,
and is also generally preferred in this scenario.

This solution is twice as fast as your solution:

def overlapping_count(string, seek):
    """
    &gt;&gt;&gt; overlapping_count('azcbobobegghakl', 'bob')
    2
    &gt;&gt;&gt; overlapping_count('auoeunbobnoeubobob,ntonethbobobo', 'bob')
    5
    """
    matches = 0
    seek_len = len(seek)
    seek_c = seek[0]
    for i, c in enumerate(string):
        if c == seek_c and string[i:i + seek_len] == seek:
            matches += 1
    return matches