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

Резултати

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

Пребарај: #agenda2030

当前筛选 #agenda2030清除筛选
CulturalExile

@CulturalExile14 · Post #3494 · 06.03.2022 г., 00:15

Eurasian lynx could be returning to UK countryside after 1,300 year absence, with Wildlife Trust's chief executive insisting they are completely harmless to humans. Is such a plan another stoke in the fire of the #GreatReset, considering the impact it will have on woodland and livestock, and most significantly, the endangerment to humans? #Agenda2030 https://inews.co.uk/news/environment/eurasian-lynx-reintrodue-rewilding-uk-wildlife-trust-craig-bennett-1330357

CulturalExile

@CulturalExile14 · Post #3416 · 20.01.2022 г., 00:20

And so the globalist agenda continues. Just as the #COVID scam appears to be falling apart, suddenly MSM are discussing gas lines from Russia again, along with possible war with Ukraine. Of course this is just the premise for the next stage, which is the cutting off of gas in the pseudo-climate change agenda. #Agenda2030#GreatReset https://youtu.be/Hsqks-I19V4

Staats-Simulation

@StaatsSimulation_BRD · Post #4458 · 16.04.2026 г., 19:54

Die 15-Minuten-Städte werden weltweit Schritt für Schritt eingeführt. Die Gesellschaft und Strukturen des öffentlichen Lebens nach und nach angepasst. Völlige Überwachung und Kontrolle. #Agenda2030#Agenda2050#NWO Wahrheit macht frei und Freiheit macht wahr 👉https://t.me/FrMaWa Denk selbst und informiere Dich 🧩

CulturalExile

@CulturalExile14 · Post #3512 · 09.03.2022 г., 14:36

Nuclear war is exactly what the #globalists want the masses in fear of and distracted by, just as they were with #COVID (which they've miraculously forgot), and perceiving #Russia as an evil threat rather than seeing beyond the concocted narrative and recognising this as yet another orchestrated war. The public falls for condemnations from the West for which it too is guilty, and is led to believe #Ukraine to be an innocent, vulnerable lamb, whilst ignorant that the war is escalating #Agenda2030, which remains unabated as the masses are deceived by smoke and mirrors. https://www.minds.com/newsfeed/1348255079953600524?referrer=CulturalExile

Daniel Prinz News

@DanielPrinzOffiziell · Post #9829 · 03.12.2025 г., 15:59

‼️6G kommt, aber was sie Ihnen nicht sagen, ist, dass es nicht Ihr Telefon verbinden wird, sondern Sie‼️ Die Verbindung des "Internet of Bodies" besteht schon länger und wird nicht erst in 2030 kommen. So sind viele Menschen bereits über tragbare Geräte wie z.B. die Smartwatch damit verbunden. Quelle:Concerned Citizen Findest du diese Information wichtig? Dann abonniere unseren Kanal! 👉@LegitimNews #6G#KI#5GMasten#Testläufe#Agenda2030

LEONARDO GUERRA

@nova_civitas · Post #16019 · 09.04.2026 г., 19:00

✅L'ex dirigente di Pfizer, il dottor Mike Yeadon, sull'Agenda 2030 delle Nazioni Unite: "Quando le Nazioni Unite, Bill Gates e Klaus Schwab ti dicono che... non viaggerai, non avrai un'auto privata... non ci saranno voli... non possiederai nulla e sarai felice, probabilmente non vivrai nella tua casa... dovresti presumere che siano seri al riguardo." #vannifrajese#giovannifrajese#piccolelucinelbuio#frajeseofficial #pfizer#agenda2030#yeadon#covid Segui il canale ufficiale per rimanere aggiornato 👇👇👇 https://t.me/vannifrajeseofficial

Kampf für unsere Zukunft ❣️

@Kampf_fuer_unsere_Zukunft · Post #51871 · 12.04.2026 г., 14:02

🔥Es ist der Vernichtungs-KRIEG gegen UNS ALLE‼️ 💥Nur mit BEFREITEN MS-Medien + SCHULEN gewinnen wir‼️☠️🗽 ——————————————— Die Teilnehmerliste des Bilderberg-Treffens 2026 Sie nehmen derzeit die weiteren Befehle zur ENTEIGNUNG und VERSKLAVUNG der Menschen entgegen ... Auch die deutsche Wirtschaftsministerin Katharina Reiche, sowie andere deutsche Lobbyisten , holen sich dort ihre neuen Befehle ab ❗😡 #Bilderberg #Bilderberger #WEF #Agenda2030 #BlackRock #Wallstreet #Zentralbanken #CityOfLondon #BIS @t.me/StuttgartGrundgesetzDemos TEILEN Folgt mir auf Telegram ↕️↕️↕️ https://t.me/Kampf_fuer_unsere_Zukunft Chat-Kanal ⬇️⬇️⬇️ https://t.me/IavYc2SRFdY1OGY6

Daniel Prinz News

@DanielPrinzOffiziell · Post #10088 · 17.02.2026 г., 09:04

🚨🌍Digitale Dystopie: Ein investigativer Film über globale digitale Überwachung Deutsche Übersetzung von Aktuell360 🇩🇪 🎥Dieser Film erklärt das digitale ID-System wie nie zuvor. Vom sozialen Bonitätssystem Chinas bis hin zu den wachsenden digitalen ID-Programmen im Westen. 🔎Digitale Dystopie deckt auf, wie die Bürger dieser Welt in ein Zeitalter der totalen Überwachung hineingezogen werden – und was wir noch tun können, um dies zu verhindern. 👀Ansehen und teilen‼️ #DigitaleDystopie#DigitaleID#Überwachungsstaat#SocialCredit#CBDC#GreatReset#Agenda2030#Totalüberwachung#Aktuell360#Antiilluminaten 🔗Quelle ⚠️EIN PERSÖNLICHER APPELL: AKTUELL360 BRAUCHT EUCH!⚠️ Kanal folgen: 🔥https://t.me/antiilluminaten