Python crea iteratori

Exemple de cod

0
0

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? : "))))
0
0

interator maning

An Iterator is an object that can be used to loop through collections,
like ArrayList and HashSet. It is called an "iterator" because "iterating" 
is the technical term for looping. To use an Iterator, you must import it 
from the java.

În alte limbi

Această pagină este în alte limbi

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................