📜  python 迭代器 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:03.045000             🧑  作者: Mango

代码示例3
def iter(times):
    it = 1
    for i in range(times):
        its = it * 2
        it = its
    return it

while True:
    print()
    print(iter(int(input("how many iteration? : "))))