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

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

      • <bdo id='XIKKM'></bdo><ul id='XIKKM'></ul>
      <tfoot id='XIKKM'></tfoot>

        For 循环遍历 2 的幂

        For loop iterate over powers of 2(For 循环遍历 2 的幂)
        <i id='UtZK1'><tr id='UtZK1'><dt id='UtZK1'><q id='UtZK1'><span id='UtZK1'><b id='UtZK1'><form id='UtZK1'><ins id='UtZK1'></ins><ul id='UtZK1'></ul><sub id='UtZK1'></sub></form><legend id='UtZK1'></legend><bdo id='UtZK1'><pre id='UtZK1'><center id='UtZK1'></center></pre></bdo></b><th id='UtZK1'></th></span></q></dt></tr></i><div id='UtZK1'><tfoot id='UtZK1'></tfoot><dl id='UtZK1'><fieldset id='UtZK1'></fieldset></dl></div>
          <legend id='UtZK1'><style id='UtZK1'><dir id='UtZK1'><q id='UtZK1'></q></dir></style></legend>

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

          • <bdo id='UtZK1'></bdo><ul id='UtZK1'></ul>
              <tbody id='UtZK1'></tbody>
          • <tfoot id='UtZK1'></tfoot>

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

                  问题描述

                  我想编写一个 for 循环,它会为每个循环迭代 2 的幂.

                  I want to write a for loop that will iterate over the powers of 2 for each loop.

                  例如,我想要这样的范围:

                  For example I would want a range like this:

                  2, 4, 8, 16, ... , 1024
                  

                  我该怎么做?

                  推荐答案

                  counter = 2
                  
                  while counter <= 1024:
                      print counter
                      counter *= 2
                  

                  这篇关于For 循环遍历 2 的幂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  What happens when you compare 2 pandas Series(当你比较 2 个 pandas 系列时会发生什么)
                  Quickly find differences between two large text files(快速查找两个大文本文件之间的差异)
                  Python - Compare 2 files and output differences(Python - 比较 2 个文件和输出差异)
                  Why do comparisions between very large float values fail in python?(为什么在 python 中非常大的浮点值之间的比较会失败?)
                  Dictionary merge by updating but not overwriting if value exists(字典通过更新合并,但如果值存在则不覆盖)
                  Find entries of one text file in another file in python(在python中的另一个文件中查找一个文本文件的条目)
                    <tbody id='s7ug9'></tbody>
                  <tfoot id='s7ug9'></tfoot>

                    <legend id='s7ug9'><style id='s7ug9'><dir id='s7ug9'><q id='s7ug9'></q></dir></style></legend>

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

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

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