Zen of Python
Полный Дзен Пайтона в одном канале Разместить рекламу: @tproger_sales_bot Правила общения: https://tprg.ru/rules Другие каналы: @tproger_channels Сайт: https://tprg.ru/site Регистрация в перечне РКН: https://tprg.ru/xZOL
Show more📈 Analytical overview of Telegram channel Zen of Python
Channel Zen of Python (@zen_of_python) in the Russian language segment is an active participant. Currently, the community unites 18 957 subscribers, ranking 6 786 in the Technologies & Applications category and 34 781 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 18 957 subscribers.
According to the latest data from 27 August, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by -157 over the last 30 days and by 7 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 12.56%. Within the first 24 hours after publication, content typically collects 6.30% reactions from the total number of subscribers.
- Post reach: On average, each post receives 2 381 views. Within the first day, a publication typically gains 1 195 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 5.
- Thematic interests: Content is focused on key topics such as github, rust, pip, api, install.
📝 Description and content policy
The author describes the resource as a platform for expressing subjective opinions:
“Полный Дзен Пайтона в одном канале
Разместить рекламу: @tproger_sales_bot
Правила общения: https://tprg.ru/rules
Другие каналы: @tproger_channels
Сайт: https://tprg.ru/site
Регистрация в перечне РКН: https://tprg.ru/xZOL”
Thanks to the high frequency of updates (latest data received on 28 August, 2026), the channel maintains relevance and a high level of publication reach. Analytics show that the audience actively interacts with content, making it an important point of influence in the Technologies & Applications category.
or и and?
Каким будет результат выражения:
5 or 0
Большинство людей уверены, что Python вернёт True. Но если запустить код, мы увидим 5. Это происходит, потому что Python возвращает само значение операнда, если оно Truthy / Falsy.
Truthy / Falsy
Любой объект Python — либо «трушный», либо «ложный»:
— Falsy: 0, "", [], {}, None, 0.0
— Truthy: всё остальное
Оператор bool(obj) конвертирует объект в логическое значение, но сами and / or возвращают ненулевые сущности: последний вычисленный операнд.
Поведение or
Оператор возвращает первый Truthy операнд, если таковой есть; иначе — последний Falsy.
5 or 0 # → 5 (первый truthy)
0 or 7 # → 7 (второе значение, truthy)
0 or '' or None # → None (все falsy, возвращается последний)
Идея: достаточно одной истины, и дальше Python не продолжает (Short‑Circuit Evaluation).
Поведение and
Оператор возвращает первый Falsy операнд, если он встретится; иначе — последний Truthy.
5 and 0 # → 0 (первый Falsy)
5 and 7 # → 7 (оба Truthy, возвращаем последний)
0 and 5 # → 0 (первый Falsy — возвращён)
Логика: and требует, чтобы обе стороны были истинными, иначе выражение — ложь.
Приоритет not, and, or
Операторы имеют встроенный приоритет:
1. not (наивысший)
2. and
3. or (наинизший)
True or False and False # → True, т. к. это эквивалентно True or (False and False)
(not False) or True # → True, сначала выполняется not.
Рекомендации
— Используйте скобки, чтобы явно показывать порядок операций;
— Не пишите слишком длинные цепочки с and / or без промежуточных переменных;
— Именованные логические условия помогают читать код.
#основыisinstance(): Проверка типов
В динамически типизированных языках нам особенно важно знать тип объекта, которым мы оперируем. С этим помогают две встроенные функции — type() и isinstance(), и мы поговорим сегодня о второй из них.
isinstance(object, classinfo)
— object: объект, тип которого вы хотите проверить
— classinfo: класс, тип или кортеж типов
# Является ли 42 целочисленным значением?
isinstance(42, int) # True
# Относится ли "hello" к одному из типов str / list (логическое «ИЛИ»)?
isinstance("hello", (str, list)) # True
isinstance() vs type()
Поначалу может показаться, что type() делает то же самое:
type(42) == int # True
Но isinstance(), в свою очередь, учитывает наследование:
class Animal:
pass
class Dog(Animal):
pass
dog = Dog()
type(dog) == Animal # False
isinstance(dog, Animal) # True
Это делает isinstance() предпочтительным выбором при работе с иерархиями классов.
#основы