title: Remove first character in line from text only if it matches defined character
body: <p>I am receiving TCP data into a file. The data is meant for a POS printer.  as such I need to strip control characters and other unwanted info. I have successfully stripped everything except the letter 'a' . However I only need to strip the character if it needed. Not every line will begin with the letter 'a'. Essentially I need to strip the letter 'a' from each line only if it is present as the first character. I don't need to strip every 'a' from the whole file.
  Below is what I am doing but it is stripping every 'a' in the file.</p>
  <pre><code>unwanted_chars=&quot;[a]&quot;
  
  def Rema():
      with open('Output.txt') as f:
          lines=list(f)
      for k, line in enumerate(lines):
          for c in unwanted_chars:
              line=line.replace(c,'')
          lines[k]=line
  
      with open('Output.txt','w') as f:
          f.write('\n'.join(lines))
  
  while True:
  
          Rema()
  </code></pre>