PYTHON COPY Contents of file1 into a specific entry in file2

file1

cat
dog
fish

file2

This is a bunch of lines
<!-- INSERT ANIMALS  HERE -->
horse
cheetah

post results
file2

This is a bunch of lines
<!-- INSERT ANIMALS  HERE -->
cat
dog
fish
horse
cheetah

code so far

import re
regex = re.compile(r"<[^*]-- INSERT ANIMALS HERE -->")
line_found = False
with open('file1.xml') as file1:
    for line in file1:
        if re.match(regex, line):
            line_found = True
            break
    with open('../file2.xml', 'a') as file2:
        if line_found:
              for line in file1:
                file2.write(line)

does not appear to be working at all

$vi ab.py
prev_line_has_tag=False

with open('file2.xml','r') as f1:
        for line in f1:
                print("",line,sep='',end="")
                if line.startswith("<!--"):
                        prev_line_has_tag = True
                if prev_line_has_tag is True:
                        with open('file1.xml','r') as f2:
                                print("",f2.read(),sep='',end="")
                        prev_line_has_tag = False

output

$ python3 ab.py
This is a bunch of lines
<!-- INSERT ANIMALS  HERE -->
cat
dog
fish
horse
cheetah