Elegant way to compare sequences
<p>Does python provide an elegant way to check for "equality" of sequences of different types? The following work, but they seem rather ugly and verbose for python code:</p>

<pre><code>def comp1(a, b):
    if len(a) != len(b):
        return False
    for i, v in enumerate(a):
        if v != b[i]:
            return False
    return True
</code></pre>

<p>The following is a bit shorter, but also less efficient since a third sequence is created:</p>

<pre><code>def comp2(a, b):
    for l, r in map(None, a, b):
        if l != r:
            return False
    return True
</code></pre>

<p>Shoehorning one of those examples into a list comprehension isn't really what I'm looking for either.</p>

<p>Edit: Ideally I am looking for a solution that doesn't create another sequence during the comparison.</p>
