title: How to split path with slashes?
body: <p>I have a requirement for adding and splitting path in my app.I want to work with this app on windows and linux.Here is my code to add paths</p>
  
  <pre><code> path = os.path.join(dir0,dir1,dir2,fn)
  </code></pre>
  
  <p>But when i am splitting with slashes i am facing problems .Because</p>
  
  <p>the path in windows like:</p>
  
  <pre><code>dir0\dir1\dir2\fn
  </code></pre>
  
  <p>the path in linux like</p>
  
  <pre><code>dir0/dir1/dir2/fn
  </code></pre>
  
  <p>Now how can i split the path with single code(with out changing the code while using other platform/platform independent)</p>