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

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

      1. <legend id='YmHrZ'><style id='YmHrZ'><dir id='YmHrZ'><q id='YmHrZ'></q></dir></style></legend>
          <bdo id='YmHrZ'></bdo><ul id='YmHrZ'></ul>

        列表或元组的成对遍历

        时间:2023-10-19
          1. <i id='XnHQE'><tr id='XnHQE'><dt id='XnHQE'><q id='XnHQE'><span id='XnHQE'><b id='XnHQE'><form id='XnHQE'><ins id='XnHQE'></ins><ul id='XnHQE'></ul><sub id='XnHQE'></sub></form><legend id='XnHQE'></legend><bdo id='XnHQE'><pre id='XnHQE'><center id='XnHQE'></center></pre></bdo></b><th id='XnHQE'></th></span></q></dt></tr></i><div id='XnHQE'><tfoot id='XnHQE'></tfoot><dl id='XnHQE'><fieldset id='XnHQE'></fieldset></dl></div>

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

            • <bdo id='XnHQE'></bdo><ul id='XnHQE'></ul>

                <tbody id='XnHQE'></tbody>
              <legend id='XnHQE'><style id='XnHQE'><dir id='XnHQE'><q id='XnHQE'></q></dir></style></legend>

                <tfoot id='XnHQE'></tfoot>

                  本文介绍了列表或元组的成对遍历的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  a = [5, 66, 7, 8, 9, ...]
                  

                  是否可以进行迭代而不是这样写?

                  Is it possible to make an iteration instead of writing like this?

                  a[1] - a[0]
                  
                  a[2] - a[1]
                  
                  a[3] - a[2]
                  
                  a[4] - a[3]
                  

                  ...

                  谢谢!

                  推荐答案

                  当然.

                  for i in range(1, len(a)):
                      print a[i] - a[i-1]
                  

                  我看不出真正的问题是什么.你读过python 教程吗?

                  I fail to see what the real problem is here. Have you read the python tutorial?

                  这篇关于列表或元组的成对遍历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:python中是否有没有结果的地图? 下一篇:python的可变长度参数(*args)是否在函数调用时扩展生成器?

                  相关文章

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

                    <bdo id='39wtn'></bdo><ul id='39wtn'></ul>

                      <legend id='39wtn'><style id='39wtn'><dir id='39wtn'><q id='39wtn'></q></dir></style></legend>
                      <tfoot id='39wtn'></tfoot>

                    1. <small id='39wtn'></small><noframes id='39wtn'>