title: Comparing two paths in python
body: <p>Consider:</p>
  
  <pre><code>path1 = "c:/fold1/fold2"
  list_of_paths = ["c:\\fold1\\fold2","c:\\temp\\temp123"]
  
  if path1 in list_of_paths:
      print "found"
  </code></pre>
  
  <p>I would like the if statement to return <code>True</code>, but it evaluates to <code>False</code>,
  since it is a string comparison.</p>
  
  <p>How to compare two paths irrespective of the forward or backward slashes they have? I'd prefer not to use the <code>replace</code> function to convert both strings to a common format.</p>