title: how to find index of \n in python string?
body: <p>i am trying to get input from user in multiple lines when user entered multiple line input then i stored in a variable buffer. and to print same multiline input i add \n after every iteration. now i want to find index of \n.<br>
      import re</p>
  
  <pre><code>buffer = ''
  while True:
      line = raw_input()
      if not line: break
  
  
      buffer +='\n'
      buffer += line
  nlf="\\n"
  nl=buffer.find(nlf)
  print nl
  </code></pre>
  
  <p>i join two lines but i want to find index \n where user press enter?</p>