Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python iterator


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? : "))))
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #python #iterator
ADD COMMENT
Topic
Name
4+8 =