Assignment raises exception for list.index
<p>How could this code fragment...</p>

<pre><code>def subInPath(origPath, subPath):
    origSplit = split(origPath, '/')
    subSplit = split(subPath, '/')

    subRoot = subSplit[0]
    origSplit.reverse()
    print origSplit.index(subRoot)
    rootIndex = origSplit.index(subRoot)

    origSplit[:rootIndex+1] = []
    origSplit.reverse()

    newPath = join(origSplit, sep)
    newPath += (sep + subPath)

    if not exists(newPath):
        raise Exception, "Path subbed in not found."
    return newPath
</code></pre>

<p>with the arguments <code>("C:/Users/MyName/Desktop/second_stage/Kickle_Pack/GardenLand_D.xml", "Kickle_Pack/Animations/TileAnims_48x48.xml")</code>...</p>

<p>Output <code>2</code> at the print statement, but throw a ValueError at the statement below it. I'm baffled. </p>
