擅长:python、mysql、java
<p>通过将两个列表内容压缩到一个新列表中,可以存储组合列表。你知道吗</p>
<pre><code>combined_list = [ [greeting, name] for name,greeting in zip(names_list,greetings_list)]
</code></pre>
<p>然后,您可以根据需要对其进行迭代</p>
<pre><code>>>> for i in combined_list:
' '.join(i)
'hi susan'
'hola juan'
'tag wolfgang'
'salut piere'
'haigh aednat'
</code></pre>