.strip()
only removes whitespace from the start and end of a string.
I think the easiest way to go about this would be to use a regex:
import re
...
for line in templ:
if line.startswith("something"):
filelist.append(re.sub(r"\s+", "", line))
\s
matches any kind of whitespace (spaces, newlines, tabs etc.).