Logo
TGCATALOG
Catalog Collections Blog
Code on a Napkin - Python coding

Code on a Napkin - Python coding

Channel about programming in Python and other languages. Simple explanations and codes.

No ratings
320
28.10.2026
320
28.10.2026
No ratings
320
28.10.2026
Safe redirect via bot
О канале

Channel about programming in Python and other languages. Simple explanations and codes.

Подписчиков 2,347
Тематика Technology
Язык English
Ссылка t.me/napkincode

We also recommend

Kekaton AI | Voiceover and voice clone
Kekaton AI | Voiceover and voice clone
Bot

AI bot for text-to-speech and voice cloning in Telegram. Create audio using neural network quickly and easily.

Description

Resource for those interested in programming. Focus on Python, but covers other topics as well. Simple examples and breakdowns.

Latest posts

Code on a Napkin - Python coding
Code on a Napkin - Python coding
🔒Открыть пост
и посмотреть медиа
Знаете ли вы, что zip() обрезает данные? zip() всегда обрезает итоговый результат по длине самого короткого итерируемого объекта: все, что длиннее, просто игнорируется. Это удобно, когда можно терять лишние данные, но может подставить, если нужна полная склейка: names = ["Alice", "Bob", "Charlie"] scores = [100, 85] list(zip(names, scores)) # [('Alice', 100), ('Bob', 85)] – Charlie больше нет zip() останавливается, как только заканчивается самый короткий аргумент. scores короче, поэтому Charlie не попал в итоговый список. Если важно сохранить все данные и заполнить пустоты, лучше использовать zip_longest из модуля itertools: from itertools import zip_longest names = ["Alice", "Bob", "Charlie"] scores = [100, 85] list(zip_longest(names, scores, fillvalue=0)) # [('Alice', 100), ('Bob', 85), ('Charlie', 0)] zip_longest не обрезает данные – он дотягивает короткие последовательности до самой длинной, заполняя пропуски fillvalue (по умолчанию None). С Python 3.10+ у zip() появился строгий режим – strict=True. Если длины не совпадают, он сразу бросает ValueError: list(zip(names, scores, strict=True)) # ValueError: zip() argument 2 is shorter than argument 1 strict=True гарантирует, что данные не потеряются случайно из-за разницы в длине итерируемых объектов. Стандартный zip() обрезает хвосты – для сохранения данных целиком лучше выбирать zip_longest, а для контроля целостности делать проверку через strict. Код на салфетке x Кусочки кода
Code on a Napkin - Python coding
FAQ

Open Code on a Napkin - Python coding in Telegram and press the Start button. No separate registration is required.

Yes. The service is designed to be straightforward: open the resource, follow the on-screen instructions and start using it.

No. You can use Code on a Napkin - Python coding directly in Telegram unless the resource description says otherwise.

Access depends on the resource. Check the current information in Telegram after opening Code on a Napkin - Python coding.

The exact features depend on the resource. Open Code on a Napkin - Python coding to see its current functions, content and access conditions.
Subscriber dynamics
+-0.4% last 30 days
Current
2,347
Month ago
2,356
Average growth
+0 / day
Updated
1 day ago

Reviews for channel Code on a Napkin - Python coding

Log in to leave a review

Only registered users can share their opinion.

No reviews yet

Be the first to share your impression of this resource!

Similar resources

Loading
Switch to Light Theme
Home Catalog Collections Blog Login