Here is my code snippet. What am I doing wrong? Not able to replace the string.
f = open("template.html", "r")
 lines = f.read()
 string = '''<header > 
 <h2 align="center"> High </h2> 
 <h4> </h4> 
 </header> '''
 if string in lines:
    print lines
    lines.replace("<header >", "<header style=background-color:red >")
    print lines
 
     
     
    