TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #83 · 11 мај

У строки в Python есть два очень похожих метода. На столько похожих что кажется они делают одно и тоже. Это метод isdigit() и isnumeric() Давайте посмотрим зачем нам два одинаковых метода? И так ли они одинаковы? Очевидно что isdigit() говорит нам, состоит ли строка только из чисел 0-9 >>> '12'.isdigit() True >>> '12x'.isdigit() False >>> '-12'.isdigit() False >>> '12.5'.isdigit() False Можно предположить что isnumeric() делает более глубокий анализ и распознаёт в строке float или отрицательное число. >>> '15'.isnumeric() True >>> '-15'.isnumeric() False >>> '15.2'.isnumeric() False Нет, всё так же как и с другим методом. В чем же тогда разница? Для начала посмотрим следующие примеры: >>> '5'.isdigit(), '5'.isnumeric() # Обычная цифра 5 # True, True >>> '꧕'.isdigit(), '꧕'.isnumeric() # Яванская 5 # True, True >>> '෩'.isdigit(), '෩'.isnumeric() # Синхала 3 # True, True >>> '৩'.isdigit(), '৩'.isnumeric() # Бенгальская 3 # True, True >>> '༣'.isdigit(), '༣'.isnumeric() # Тибетская 3 # True, True >>> '³'.isdigit(), '³'.isnumeric() # 3 верхний индекс (степень) # True, True >>> '𝟝'.isdigit(), '𝟝'.isnumeric() # Математическая двойная 5 # True, True >>> '๔'.isdigit(), '๔'.isnumeric() # Тайская 4 # True, True >>> '➑'.isdigit(), '➑'.isnumeric() # 8 в круге # True, True А теперь примеры в которых, по мнению Python, результаты не равны >>> '¾'.isdigit(), '¾'.isnumeric() # дробь три четверти # False, True >>> '⅕'.isdigit(), '⅕'.isnumeric() # дробь одна пятая # False, True >>> '𒐶'.isdigit(), '𒐶'.isnumeric() # клинопись 3 # False, True >>> '三'.isdigit(), '三'.isnumeric() # 3 из унифицированной идеограммы # False, True >>> '⑩'.isdigit(), '⑩'.isnumeric() # цифра 10 в круге # False, True >>> 'Ⅳ'.isdigit(), 'Ⅳ'.isnumeric() # Римская 4 # False, True >>> '𑇪'.isdigit(), '𑇪'.isnumeric() # Сенегальская архаическая 10 # False, True >>> '𐌢'.isdigit(), '𐌢'.isnumeric() # Этрусская цифра 10 # False, True >>> 'ↂ'.isdigit(), 'ↂ'.isnumeric() # Римская цифра 10000 # False, True >>> '〇'.isdigit(), '〇'.isnumeric() # Символ ККЯ ноль # False, True Получается, что isdigit() говорит нам, является ли символ десятичной цифрой или спецсимволом, имеющим цифирное значение после преобразования. В свою очередь isnumeric() включает все дополнительные символы юникода которые имеют отношения к числовым и цифровым представлениям. Ну и пара примеров в которых в обоих случаях символ не является числом, это эмодзи. >>> '🕙'.isdigit(), '🕙'.isnumeric() # эмодзи 10 часов # False, False >>> '7️⃣'.isdigit(), '7️⃣'.isnumeric() # эмодзи 7 # False, False Также есть еще один дополнительный и весьма полезный метод isdecimal(). Он нам сообщает, можно ли из указанного символа сделать простую десятичную цифру. То есть сработает ли метод int(x) >>> '෩'.isdecimal(), int('෩') # Синхала 3 # True, 3 >>> '➑'.isdecimal(), int('➑') # 8 в круге # False, ValueError Какие выводы? 🔸 При определении цифры в строке isdigit() подходит лучше чем isnumeric(), но оба не гарантируют успешную конвертацию в int 🔸 Для однозначного определения возможности преобразования строки в int лучше подходит метод isdecimal() 🔸 Для однозначного определения символов 0...9 лучше использовать regex Полный список символов юникода которые определяются как numeric #basic

Hashtags

Резултати

Пронајдени 10 слични објави

Пребарај: #winners

当前筛选 #winners清除筛选
VISION11

@vision11official · Post #1690 · 25.04.2024 г., 10:59

We have got our winners!🏆🎖 The top 10 #winners are here and will get a chance to meet Chennai Super Kings players. Thank you for participating in this contest. Let's keep playing and continue the winning journey!💰#Vision11

BLC Market - mini-app BulCoin

@bulcoin_blc · Post #274 · 06.03.2026 г., 23:00

The M-session of the project took place today. The following took part in the action: 28 TON-wallets 🏆20 participants received 200,000 BLC each 🎁 During the AMA one participant received: 1,000,000 BLC All participants of the first stage will be invited to the closed chat of BLC Market testers and will receive the status of Pioneers with bonuses The next stage of the project will be announced soon. #giveaway#winners FAQ | BUY

HEXN.IO Channel

@hexnio · Post #162 · 09.02.2023 г., 06:36

We are happy to Announce the #HEXN Meme Contest #Winners! Congratulations #Winners (Twitter Handles)👇! @ScaredHulk @cryingrnf @dionysuz_ @odukunelson @uonyekiss @crypto0harry @greymegawin @wangshuthian @mr_h_kumawat @BOSSSMUDA9 You have won 10$ per each winner. You will receive your reward on the platform 🏆🎉 🎉 Send us a DM with your Registered Email on #HEXN to claim your rewards! DM @MaxAttacker or our Twitter @hexn_io If your weren't chosen this time around, don't worry! We love memes, so there's more contests on the way. https://twitter.com/hexn_io/status/1623563743123902465

Mappasaurus Official Channel

@mappasaurusofficial · Post #253 · 06.04.2025 г., 14:18

Dinos 🦖 The moment we’ve all been waiting for is almost here. It looks like something is about to pop up as we get close to hatching season. Are you ready to see what’s inside those mighty eggs you’ve collected ? Tik…Tok... Show us your 🥚EGG collection, We are #givingaway a 10M $CRACKA to 10 lucky #winners from the posted eggs, To enter: 1. Post your eggs under this tweet. 2. Share your TON wallet address The top 3 winners will each receive 2M $CRACKA, the 4th and 5th place winners will receive 1M each and the remaining winners will receive 400k $CRACKA each. Don't have EGGS yet? Don't worry, start collecting now and join the fun: @MappasaurusAppBot 👀Follow us on: Twitter|Instagram|Medium|Youtube|Linkedin| Facebook| Threads| Mastodon

CONGRATULATIONS FOR ALL WINNERS!🎆 You won the 5 $TON prizes in the contest 1. https://x.com/JisanHk67290/ 2. https://x.com/mattmcap/ 3. https://x.com/Zacker200302/ 4. https://x.com/Crypt0jace/ 5. https://x.com/Isabell_Krypto/ Pls DM us in X from your accounts and provide your TON wallet 😎Follow us on X and wait for the next contest! #TON#winners#contest#TONEvents

КРІСЛО🃏🃏🃏

@pokerchris · Post #1747 · 08.12.2025 г., 08:43

🌟 ПІДСУМКИ ЛІДЕРБОРДУ НА REDSTAR! 🌟 Ось і результати нашого лідерборду на RedStar Poker! Вітаю переможців, які довели свій скіл на полі. 🥇 1 місце: MANUMBA 💰 Приз: $20 🥈 2 місце: RedStar113 💰 Приз: $10 🥉 3 місце: smak511 💰 Приз: $5 Призи будуть нараховані найближчим часом. Дякую за активну участь усім гравцям! Забирай 200% БОНУС на перший деп! + Ексклюзивні розіграші та призові ЛІДЕРБОРДИ для рефів! 🚀👉 📎 Реєстрація у RedStar 📎 Реєстрація у RedStar 📎 Реєстрація у RedStar #RedStarPoker#PokerLeaderboard#Winners#Покер

O‘zbekiston jamoasini muvaffaqiyatli g‘alaba bilan tabriklaymiz! 💥 “Techno Mind” jamoasi “Aquatibia” loyihasi bilan Tech4Good global finalida ishtirok etib, “Silver Award” (ikkinchi o'rin)ni qo‘lga kiritdi. 🏆 Shuningdek, “People's choice award” tanlovida ham O‘zbekiston jamoasi g'oliblar qatoridan o'rin egalladi. 💧Aquatibia – qishloq xo‘jaligi uchun raqamli texnologiyalardan foydalangan holda integratsiyalashgan suv filtrlash tizimini yaratish loyihasi hisoblanadi. 🎗Yoshlarimizdan kelajakda bundanda yuqori natijalarni kutib qolamiz! 🔁English ➖➖➖➖➖➖➖➖➖➖➖➖➖ #SeedsfortheFuture#Aquatibia#global_final#winners#Tech4Good#TechnoMind ⬇️ Biz ijtimoiy tarmoqlarda: Veb-sayt | Telegram | Instagram | Facebook

Green University CA | Official

@centralasian_greenuniversity · Post #918 · 19.03.2026 г., 12:08

Youth Day – Winners of the Sports Competitions! 🏅💪On March 18, 2026, at Green University, sports competitions were held in celebration of Youth Day, and the winners were announced! 🏆Winners among male students: 🥇1st place: Khakimov Muhiddin (LAW-103) 🥈2nd place: Nurimov Diyorbek (LAW-102) 🥉3rd place: Toshpulatov Orifjon (EEP-101) 🏆Winners among female students: 🥇1st place: Bakhtiyorova Saodatxon (ESM-202) 🥈2nd place: Ulugmurodova Yasmina (LAW-104) 🥉3rd place: Qutbiddinova Mubina (LAW-104) 👏Congratulations to all the winners! Your strength, dedication, and passion for sports inspire us! #GreenUniversity#YouthDay#SportsCompetitions#StudentLife#Tashkent#Winners __________________ Yoshlar kuni – sport musobaqalari g‘oliblari! 🏅💪18-mart 2026 yil kuni Green University’da Yoshlar kuni munosabati bilan o‘tkazilgan sport musobaqalarida g‘oliblar aniqlandi! 🏆O‘g‘il bola talabalar orasidagi g‘oliblar: 🥇1-o‘rin: Xakimov Muhiddin (LAW-103) 🥈2-o‘rin: Nurimov Diyorbek (LAW-102) 🥉3-o‘rin: Toshpo‘latov Orifjon (EEP-101) 🏆Qiz bola talabalar orasidagi g‘oliblar: 🥇1-o‘rin: Baxtiyorova Saodatxon (ESM-202) 🥈2-o‘rin: Ulug’murodova Yasmina (LAW-104) 🥉3-o‘rin: Qutbiddinova Mubina (LAW-104) 👏Barcha g‘oliblarni tabriklaymiz! Sizlarning kuchingiz, mashaqqatlaringiz va sportga bo‘lgan ishtiyoqingiz bizni ilhomlantiradi! #GreenUniversity#YoshlarKuni#SportMusobaqalari#TalabaHayoti#Toshkent#G‘oliblar ✉️[email protected] ☎️ +998 55 512 00 77 📍Location 🌐Website | 📱Telegram | 📱Instagram | 📱LinkedIn | 🟥YouTube

🇷🇺 Οι Ρώσοι μαθητές κατέκτησαν 6 μετάλλια στη Μαθηματική Ολυμπιάδα 🏆 Οι μαθητές κέρδισαν πέντε χρυσά και ένα ασημένιο μετάλλιο στην 66η Διεθνή Μαθηματική Ολυμπιάδα, που πραγματοποιήθηκε στην Αυστραλία. 🥇 Χρυσά μετάλλια απονεμήθηκαν στους: ➡️ Ιβάν Τσασόβσκιχ, Χίμκι, Περιφέρεια Μόσχας ➡️ Ντμίτρι Γκρισκό, Μόσχα ➡️ Ιλιά Ζαμοτόριν, Αγία Πετρούπολη ➡️ Βασίλι Πάτρουσεφ, Βλαδιβοστόκ ➡️ Αρτέμ Σαντικοφ, Τσελιάμπινσκ 🥈 Το ασημένιο μετάλλιο κέρδισε ο Ιβάν Κόκαρεφ από το Τσελιαμπίνσκ. 🎊 Θερμά συγχαρητήρια στα παιδιά! Τους ευχόμαστε ακόμη περισσότερες επιτυχίες στο μέλλον! 🇷🇺 Российские школьники завоевали 6 медалей на математической олимпиаде 🏆 Ребята взяли пять золотых и одну серебряную медаль на 66-й Международной математической олимпиаде, которая прошла в Австралии. 🥇 Золотых медалей удостоены: ➡️ Иван Часовских, Химки, Московская область ➡️ Дмитрий Гришко, Москва ➡️ Илья Замоторин, Санкт-Петербург ➡️ Василий Патрушев, Владивосток ➡️ Артем Садыков, Челябинск 🥈 Серебряную медаль получил Иван Кокарев из Челябинска. 🎊 Поздравляем ребят и желаем новых побед! @rossotrudnichestvo@rusembgreece #Ρωσία#Μαθηματικά#ΔιεθνήςΟλυμπιάδα#RussianStudents#MathOlympiad#Επιτυχία#Νίκη#Διακρίσεις#Μαθητές#ΡωσικήΕκπαίδευση#Russia#Education#Success#Winners#Olympiad#Россия