def restriction_sites(s1, s2):
    """ (str, str) -> list of int
    
    Precondition: s1 only contains characters from 'A', 'T', 'C' or 'G'.
                  s2 is a recognition sequence. 
    
    Return a list of all the indices where s2 appears in s1.
    
    >>> restriction_sites('GCTATCGAGGATCGA','TCGA')
    [4, 11]
    >>> restriction_sites('GGCCTAGAGGCCAGGCCGGC','GGCC')
    [0, 8, 13]
    """
    
    result = []
    a = s1.find(s2)
    
    if a != -1: 
        while len(result) < s1.count(s2):
            result.append(a)
            a = s1.find(s2, a + 1)
    return result