title: Python - Best way to compare two strings, record stats comparing serial position of particular item?
body: <p>I'm dealing with two files, both of which have lines that look like the following:</p>
  
  <p>This is || an example || line . </p>
  
  <p>In one of the files, the above line would appear, whereas the corresponding line in the other file would be identical BUT might have the '||' items in a different position:</p>
  
  <p>This || is an || example || line .</p>
  
  <p>I just need to collect stats for how often a "||" fell in the "right" place in the second file (we're assuming the first file is always "right"), how often a "||" fell in a place where the first file didn't have a "||", and how the number of overall "||" markers differed for that particular line. </p>
  
  <p>I know I could do this alone, but wondered if you brilliant folks knew some incredibly easy way of doing this? The basic stuff (such as reading the files in) is all stuff I'm familiar with--I'm really just looking for advice on how to do the actual comparisons of lines and collect the stats!</p>
  
  <p>Best,
  Georgina</p>