from itertools import product

mininter = 1
maxinter = 4
repmotif = "CAG"

bases = ['C', 'G', 'A', 'T']

all_interruptions = []

for inter_size in range(mininter, maxinter+1):
    iterator = product(bases, repeat=inter_size)
    for inter in iterator:
        all_interruptions.append(''.join(inter))
 
interruptions = [i for i in all_interruptions if repmotif not in i]
        
        
print(interruptions)
        
#interruptions.remove(repmotif)
    