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

    • <bdo id='oY2AL'></bdo><ul id='oY2AL'></ul>
  • <i id='oY2AL'><tr id='oY2AL'><dt id='oY2AL'><q id='oY2AL'><span id='oY2AL'><b id='oY2AL'><form id='oY2AL'><ins id='oY2AL'></ins><ul id='oY2AL'></ul><sub id='oY2AL'></sub></form><legend id='oY2AL'></legend><bdo id='oY2AL'><pre id='oY2AL'><center id='oY2AL'></center></pre></bdo></b><th id='oY2AL'></th></span></q></dt></tr></i><div id='oY2AL'><tfoot id='oY2AL'></tfoot><dl id='oY2AL'><fieldset id='oY2AL'></fieldset></dl></div>

      <tfoot id='oY2AL'></tfoot><legend id='oY2AL'><style id='oY2AL'><dir id='oY2AL'><q id='oY2AL'></q></dir></style></legend>

      1. 如何格式化列表以在 python 的单独行上打印每个元

        时间:2023-10-08
          • <bdo id='ysx4S'></bdo><ul id='ysx4S'></ul>
              <tbody id='ysx4S'></tbody>
            <tfoot id='ysx4S'></tfoot>

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

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

                1. 本文介绍了如何格式化列表以在 python 的单独行上打印每个元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  如何格式化列表以在单独的行上打印每个元素?例如我有:

                  How can I format a list to print each element on a separate line? For example I have:

                  mylist = ['10', '12', '14']
                  

                  我希望格式化列表,使其打印如下:

                  and I wish to format the list so it prints like this:

                  10
                  12
                  14
                  

                  所以 、方括号、逗号和 '' 被删除,每个元素都打印在单独的行上谢谢

                  so the , brackets, commas and '' is removed and each element is printed on a separate line Thanks

                  推荐答案

                  你可以只使用一个简单的循环:-

                  You can just use a simple loop: -

                  >>> mylist = ['10', '12', '14']
                  >>> for elem in mylist:
                          print elem 
                  
                  10
                  12
                  14
                  

                  这篇关于如何格式化列表以在 python 的单独行上打印每个元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:将“十进制标记"千位分隔符添加到数字 下一篇:pandas xlsxwriter,格式头

                  相关文章

                  最新文章

                    <tfoot id='SeaC9'></tfoot>
                    • <bdo id='SeaC9'></bdo><ul id='SeaC9'></ul>
                  1. <small id='SeaC9'></small><noframes id='SeaC9'>

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

                    1. <legend id='SeaC9'><style id='SeaC9'><dir id='SeaC9'><q id='SeaC9'></q></dir></style></legend>