title: Get the string before the certain character in python
body: <p>I have the following string. I want to get everything before the character |</p>
  <pre><code>'abc eff 23 aaa|C:\\WINDOWS|\\Device\\Harddisk\\Parti'
  </code></pre>
  <p>My output should be like 'abc eff 23 aaa'</p>
  <p>How do i get it.. Please help me with this</p>