title: How to write on the second line of a text file, ignoring the first line?
body: <p>I want to write into a text file from the second line.</p>
  
  <p>At the moment to write data onto a text file I use:</p>
  
  <pre><code>with open("data1.txt", "w") as file:
  
      file.write(str(round(strength, 2)) + "\n")
  
  file.close()
  </code></pre>
  
  <p>'Strength' as in a value(Number)</p>
  
  <p>To read from a specific line (The second line in this case) from the text file:</p>
  
  <pre><code>with open("data1.txt", "r", encoding="utf-8") as file:
  
      S1 = file.readlines()
      S1 = float(S1[1].strip())
  file.close()
  </code></pre>
  
  <p>How can I write onto a file from the second line starting with:</p>
  
  <pre><code>with open("data1.txt", "w+", encoding="utf-8") as file:
  </code></pre>
  
  <p>I know that to write from the beginning of the text file I need to use:</p>
  
  <pre><code>file.seek(0)
  </code></pre>
  
  <p>How can I replace/change/write from the second line?</p>