title: Edit specific line at specific position in Text file in Python
body: <p>I have two variables <strong>x1=123.12 and y1=123.45</strong> which holds user entered values .Now I have a text file in which I have to change current <strong>245.42 and 130.32</strong> with the variable <strong>x1 and y1</strong> which holds user entered values.So <strong>how can I modify text file</strong> in python?</p>
  
  <pre><code>#text file:
  
  var char12
  name andy jordan
  home illino
  
  w1 345 3456 
  p1 346 2123
  addmoney 245.42
  netmoney 130.32
  </code></pre>