def get_content(sequence, aa, window_size):
    """Compute proportion of selected amino acids in string."""
    proportions = []
    for index in range(0, (len(sequence) - window_size + 1)):
        subseq = sequence[index : index + window_size]
        occurrences = 0
        for letter in aa:
            occurrences += subseq.count(letter)
        proportion = occurrences / window_size
        proportions += [proportion]

    return proportions