def Pattern_Matching(Pattern, Seq):
    """    
    Exercice 1.3.5 Pattern Matching.
    Description: Find all occurrences of a pattern in a string.
         Input: Two strings, Pattern and Seq.
         Output: All starting positions where Pattern appears as a substring of Seq.
          
    Sample Input:
         ATAT
         GATATATGCATATACTT
     
    Sample Output:
         1 3 9     
    """

    R = []
    idx = -1
    while True:
        idx = Seq.find(Pattern,idx+1)
        if idx == -1: 
            break
        else: 
            R.append(idx)
    return R