Python - Assigning 2 variables from one string <p><strong>values</strong> is an array; <strong>eventTokens</strong> is a string (first element of values). What does the double assignment do? (What are the values of eventToken1 &amp; eventToken2?)</p> <pre><code>values = data.split("\x01") eventTokens = values.pop(0) eventToken1, eventToken2 = eventTokens </code></pre> <p>I've done an output task (on the Python source) that resulted in the following:</p> <pre><code>eventTokens is →☹ eventToken1 is → eventToken2 is ☹ </code></pre> <p>I concluded that the vars somehow split the initial string. However, if I tried compiling an (apparently) similar thing: </p> <pre><code>arr = ["some", "elements", "inarray"] c = arr.pop(0) a, b = c print c print a print b </code></pre> <p>It resulted in an exception: <em>ValueError: too many values to unpack</em> .</p> <p>Note: <code>print</code> is not a parameterized method in the tested environment </p>