How can I convert a list to named variables in Python?
<p>Is there a quick way in python to convert a list of values to named variables?</p>

<p>For example:</p>

<pre><code>row = ['files', 'file.pdf', 'D1234', 43]      

folder = row[0]
name = row[1]
doc_id = row[2]
page_num = row[3]
</code></pre>

<p>You can use <a href="https://docs.python.org/3/tutorial/controlflow.html#unpacking-argument-lists">unpacking</a></p>

<pre><code>folder, name, doc_id, page_num = row
</code></pre>

python list