title: Python write newline without \n
body: <p>Hey I need to write a string to a text file but i need it to not have a \n as I am using it as a database. The script works fine but doesnt actually write into a newline obviously because I strip()-ed it. I was wondering if there was a way around even in another language.
  So far I tried:</p>
  
  <pre><code>textfile = open('pass.txt.','a')
  ask = raw_input("[+] Do you want to append you own passwords(y/n)")
  if ask == "y":
      print "[+] Use quit_appender_now to quit adding string"
      while True:
          stri = raw_input("[+] Enter word to add--&gt;")
          if stri == "quit_appender_now":
              break
          else:
              stri = stri + "\n"
              textfile.write(stri.strip())
  elif ask =="n":
      pass 
  </code></pre>
  
  <p>The reason I dont want to use \n is because of this code:</p>
  
  <pre><code>with open('pass.txt'),'r') as r_text:
      for x in r_text:
          print repr(x)
  </code></pre>
  
  <p>The above code will print out the string with \n. Is there any way to get around this?
  For example if pass.txt had asdf in there print repr(x) would print asdf\n. I need it to print asdf</p>