title: Keeping only certain characters in a string using Python?
body: <p>In my program I have a string like this:</p>
  
  <p>ag ct oso gcota</p>
  
  <p>Using python, my goal is to get rid of the white space and keep only the a,t,c,and g characters.
  I understand how to get rid of the white space (I'm just using line = line.replace(" ", "")). But how can I get rid of the characters that I don't need when they could be any other letter in the alphabet? </p>