擅长:python、mysql、java
<p>您可以使用<a href="https://docs.python.org/3.4/library/functions.html#enumerate">^{<cd1>}</a>和字典理解:</p>
<pre><code>>>> arr = ["aa", "bb", "cc"]
>>> {'item{}'.format(i): x for i,x in enumerate(arr)}
{'item2': 'cc', 'item0': 'aa', 'item1': 'bb'}
</code></pre>