title: How to add something to a lot of line from a file until condition is met?
body: <p><strong>So I have a text file that looks like this:</strong></p>
  
  <p>'''</p>
  
  <p>Name: John</p>
  
  <p>Last Name: Brown</p>
  
  <p>'''</p>
  
  <p><strong>All I want is to print something in the beginning of the ''' quotation marks and in the beginning of all the lines that follow UNTIL I read another set of quotation marks.</strong></p>
  
  <p><strong>This is what I've been trying to code:</strong></p>
  
  <pre><code>for line in infile:
      if line.find("'''") !=-1:        
              print("PROTECTED",line.rstrip(),end = "")
  </code></pre>
  
  <p><strong>How I want it to look like:</strong></p>
  
  <p>PROTECTED '''</p>
  
  <p>PROTECTED Name:John</p>
  
  <p>PROTECTED Last Name:Brown</p>
  
  <p>PROTECTED '''</p>
  
  <p><strong>I have more data after that but I can't figure out how to only put PROTECTED on those lines.</strong></p>
  
  <p><strong>I think my for loop is wrong a little bit and I need help with that.</strong></p>