ChatCrawlerпоиск по публичному Telegram Открыть приложение
3

30 Days Of Python

сообщение · 2024-06-05 20:18 UTC
I
You use for loop, when you know how many iterations you are going to do, for example you want to loop a list that contains numbers: [1, 2, 3, 4, 5]. This case you know how many times you are going to loop (5) times. And then it will exist the loop and continues execution You use while loop when you don't know how many times you'll execute the code, for example let's say you want to ask the user for an input number and then you print('The number you typed is', number). But if the user enter "x", you should exist loop: while True: number = int(input('Enter number')) If number == 0: break Print('Number is ', number)

Все сообщения за 5 июня 2024 · Вся лента · оригинал в Telegram

Открыть в Telegram Каталог площадок Искать в ChatCrawler

Слепок открытой публичной ленты из поискового индекса ChatCrawler — «Google по публичному Telegram»; обновляется по мере обхода площадки. Время — UTC.

Только публичный контент, официальный API Telegram. О проекте · Вопросы · Чего мы не делаем · Убрать страницу из выдачи · Каталог