title: how to search new line character from a string in python
body: <p>I want to split string based on new line character and replace the new line with a '.' in python. I tried this code but I'm not getting it.</p>
  
  <pre><code>import nltk
  from nltk.tokenize.punkt import PunktSentenceTokenizer, PunktParameters, PunktLanguageVars
  ex_sent="Conclusion &amp; Future Work
       In our project we have tried for implementing northbound SDN application for OpenFlow protocol evaluation. The client and the RYU application is being connected, via socket connection."
  class CommaPoint(PunktLanguageVars):
      sent_end_chars = (',','\n')
  tokenizer = PunktSentenceTokenizer(lang_vars = CommaPoint())
  sentences = sentence_splitter.tokenize(ex_sent)
  print sentences
  </code></pre>