擅长:python、mysql、java
<p>您可以尝试以下方法:</p>
<pre><code>>>> list_ = [['CCND1', '67', 'FAS', '99', 'IRAK3', '92', 'ALG14', '86', 'ADRBK1', '10'], ['PTRX', '95', 'CCNA', '33']]
>>> paired_list = (zip(*[iter(l)]*2) for l in list_)
>>> sorted_list = [list(sum(sorted(l, key=lambda x: x[0]),())) for l in paired_list]
>>> sorted_list
[['ADRBK1', '10', 'ALG14', '86', 'CCND1', '67', 'FAS', '99', 'IRAK3', '92'],
['CCNA', '33', 'PTRX', '95']]
</code></pre>
<p>参考资料:</p>
<ol>
<li><p><a href="https://stackoverflow.com/q/2233204/5431791">^{<cd1>}</a></p></li>
<li><p><a href="https://python-reference.readthedocs.io/en/latest/docs/functions/sorted.html" rel="nofollow noreferrer">^{<cd2>}</a></p></li>
<li><p>我用了<a href="https://stackoverflow.com/a/42059707/5431791">^{<cd3>} to concatenate the list of tuples</a>。但是,如果您准备使用其他模块,则最好使用<a href="https://docs.python.org/3/library/itertools.html#itertools.chain.from_iterable" rel="nofollow noreferrer">^{<cd4>}</a></p></li>
</ol>