Счетчик циклов While и For ⇐ Python

Программы на Python
Anonymous
Счетчик циклов While и For

Сообщение Anonymous »

Я только начинаю изучать Python, но не могу понять логику, лежащую в основе этого, и надеюсь, что кто-нибудь объяснит.
# this works without a counter
Numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
for Numbers in Numbers:
print(Numbers)

Но
# this doesn't work without a counter
Numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
while Numbers in Numbers

Подробнее здесь: https://stackoverflow.com/questions/718 ... op-counter

Вернуться в «Python»