• <tfoot id='E928I'></tfoot>

    <small id='E928I'></small><noframes id='E928I'>

      <i id='E928I'><tr id='E928I'><dt id='E928I'><q id='E928I'><span id='E928I'><b id='E928I'><form id='E928I'><ins id='E928I'></ins><ul id='E928I'></ul><sub id='E928I'></sub></form><legend id='E928I'></legend><bdo id='E928I'><pre id='E928I'><center id='E928I'></center></pre></bdo></b><th id='E928I'></th></span></q></dt></tr></i><div id='E928I'><tfoot id='E928I'></tfoot><dl id='E928I'><fieldset id='E928I'></fieldset></dl></div>
        <bdo id='E928I'></bdo><ul id='E928I'></ul>
      1. <legend id='E928I'><style id='E928I'><dir id='E928I'><q id='E928I'></q></dir></style></legend>

        如何在python中展平元组

        How to flatten a tuple in python(如何在python中展平元组)
        <tfoot id='BjJ9o'></tfoot>

      2. <i id='BjJ9o'><tr id='BjJ9o'><dt id='BjJ9o'><q id='BjJ9o'><span id='BjJ9o'><b id='BjJ9o'><form id='BjJ9o'><ins id='BjJ9o'></ins><ul id='BjJ9o'></ul><sub id='BjJ9o'></sub></form><legend id='BjJ9o'></legend><bdo id='BjJ9o'><pre id='BjJ9o'><center id='BjJ9o'></center></pre></bdo></b><th id='BjJ9o'></th></span></q></dt></tr></i><div id='BjJ9o'><tfoot id='BjJ9o'></tfoot><dl id='BjJ9o'><fieldset id='BjJ9o'></fieldset></dl></div>
          1. <small id='BjJ9o'></small><noframes id='BjJ9o'>

            • <legend id='BjJ9o'><style id='BjJ9o'><dir id='BjJ9o'><q id='BjJ9o'></q></dir></style></legend>
                <bdo id='BjJ9o'></bdo><ul id='BjJ9o'></ul>

                    <tbody id='BjJ9o'></tbody>

                1. 本文介绍了如何在python中展平元组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个列表的以下元素,该列表有 100 个元素长.

                  I have the following element of a list, and the list is 100 elements long.

                  [(50, (2.7387451803816479e-13, 219))]
                  

                  如何将每个元素转换成这样?

                  How do I convert each element to look like this?

                  [(50, 2.7387451803816479e-13, 219)]
                  

                  推荐答案

                  [(a, b, c) for a, (b, c) in l]
                  

                  元组打包和解包解决了这个问题.

                  这篇关于如何在python中展平元组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Initialize Multiple Numpy Arrays (Multiple Assignment) - Like MATLAB deal()(初始化多个 Numpy 数组(多重赋值) - 像 MATLAB deal())
                  How to extend Python class init(如何扩展 Python 类初始化)
                  What#39;s the difference between dict() and {}?(dict() 和 {} 有什么区别?)
                  What is a wrapper_descriptor, and why is Foo.__init__() one in this case?(什么是 wrapper_descriptor,为什么 Foo.__init__() 在这种情况下是其中之一?)
                  Initialize list with same bool value(使用相同的布尔值初始化列表)
                  setattr with kwargs, pythonic or not?(setattr 与 kwargs,pythonic 与否?)
                    <tbody id='ZCvZL'></tbody>
                2. <i id='ZCvZL'><tr id='ZCvZL'><dt id='ZCvZL'><q id='ZCvZL'><span id='ZCvZL'><b id='ZCvZL'><form id='ZCvZL'><ins id='ZCvZL'></ins><ul id='ZCvZL'></ul><sub id='ZCvZL'></sub></form><legend id='ZCvZL'></legend><bdo id='ZCvZL'><pre id='ZCvZL'><center id='ZCvZL'></center></pre></bdo></b><th id='ZCvZL'></th></span></q></dt></tr></i><div id='ZCvZL'><tfoot id='ZCvZL'></tfoot><dl id='ZCvZL'><fieldset id='ZCvZL'></fieldset></dl></div>
                3. <legend id='ZCvZL'><style id='ZCvZL'><dir id='ZCvZL'><q id='ZCvZL'></q></dir></style></legend>

                          <small id='ZCvZL'></small><noframes id='ZCvZL'>

                            <bdo id='ZCvZL'></bdo><ul id='ZCvZL'></ul>

                            <tfoot id='ZCvZL'></tfoot>