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

Резултати

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

Пребарај: #streaming

当前筛选 #streaming清除筛选

🤍💫 | #BTS News 🗞️ — FESTA CUP IS COMING!! 🏆 Let’s work together to support SWIM & ARIRANG’s longevity and increased streaming from May 12th - Jun 13th. Tomorrow begins with the “Please SWIM One More Night” Streaming Battle and Streaming Parties. Check Link for more info👇🏻 🔻 : (https://festa2026.carrd.co/) #streaming @foreverbulletproof7

Direction的碎碎念

@directionchannel · Post #5692 · 11.08.2022 г., 04:54

#News#Streaming 📺迪士尼流媒体总订户数超过Netflix 迪士尼旗下流媒体(Disney+, ESPN+, Hulu)总订户数达到2.21亿,超过Netflix2.207亿,成为全球最大的流媒体公司 其中Disney+ 1.377亿,Hulu 4560万,ESPN+ 2230万 Channel:@Odyssey+

纯情男高

@hanzichen · Post #1453 · 18.12.2025 г., 05:02

PlayTorrio PlayTorrio is an all-in-one media center application that brings together streaming, torrenting, and media management in a beautiful, easy-to-use interface. 🔗 Links: - Download - Screenshots - Features - Website - Source code Developer: ayman707-ux 🫂 Special thanks to: • ᴅᴜxᴛᴀᴍɪ for post • Chopra Ji | [#Inactive] for banner • alex†s | chime/rtwo for screenshots ❤️ Support the Project If this project makes your life easier, here are a few quick ways to show some love: ⭐ Star the repo/app ☕ Buy a coffee for the developer 🛠 Contribute code, issues, or pull-requests 🏷 Tags: #Streaming#Linux#Windows#MacOS

BotsGram®

@botsgram_cu · Post #3652 · 14.03.2021 г., 17:03

¿Que puede hacer este bot? @FileStreamingBot Este bot le brinda un enlace para transmitir cualquier archivo, película o video en Telegram a través de servidores de alta velocidad. También puede descargar el archivo usando un administrador de descargas IDM o ADM. Idioma: inglés (Visto en @botsgram_cu) #enlaces#videos#streaming#descargas

BotsGram®

@botsgram_cu · Post #4022 · 15.06.2021 г., 23:08

¿Que puede hacer este bot? @StreamRadarBot Este bot le muestra en qué plataformas de transmisión están disponibles las películas o series de su elección. Idiomas: español, inglés (Visto en @botsgram_cu) #películas#series#streaming

Libreware

@libreware · Post #1197 · 31.10.2023 г., 13:57

. Louis Rossman and FUTO have released another not -FOSS app of interest. This time they bring us the #video#streaming app #Grayjay, which is designed to let you surf and search all you favorite video streaming services at once. Grayjay does everything the popular NewPipe app does, plus more. Unfortunately NewPipe only worked with YouTube and PeerTube. So far Grayjay works w/these platforms (to a certain extent) - Rumble - Odysee - Youtube - FUTO's PeerTube Instance - Twitch - Patreon - Soundcloud - Kick - Nebula Sorry, no BitChute so far. You can download videos for offline viewing, and then export those to your Movies folder on your phone. You can download the apk install file here: https://grayjay.app/ Their GitLab source code can be found here: https://gitlab.futo.org/videostreaming/grayjay Casting: https://gitlab.futo.org/videostreaming/grayjay/-/blob/master/docs/casting.md ⚠️ License https://gitlab.futo.org/alex/voiceinput/-/blob/master/FTL_LICENSE.md ⚡️@LinuxTechIndex

BotsGram®

@botsgram_cu · Post #3054 · 11.10.2020 г., 04:52

¿Que puede hacer este bot? @anime_streaming_bot ¡Este bot ofrece una enorme biblioteca de anime que puedes ver en streaming sin ningún tipo de publicidad, subtitulados y doblados en ingles, espanol e italiano también es HD! Idiomas: Inglés Italiano Español (Visto en @botsgram_cu) #anime#descarga#streaming#manga

Libreware

@libreware · Post #1198 · 02.11.2023 г., 04:37

BraveNewPipe A libre lightweight streaming front-end for Android Due to restrictive project policy, the #NewPipe team refuses to add platforms that they find offensive. This fork (BraveNewPipe) will not be as restrictive. As long as the platforms work in the spirit of free speech, they could be integrated. Nevertheless, platforms that promote pornography or other degrading things will NOT be included here. Contribute This fork will focus only on integrating other platforms. Unrelated patches will be rejected for now. Feel free to suggest which alternative platforms should be included. Any contribution (development/testing/bug report) is greatly appreciated. Which additional platforms are supported? Bitchute Rumble Other features not found in NewPipe -NewPipe x Sponsorblock into this fork -searchfilters: in the action menu of the search page you can now change the search behavior for the actual search. The supported content/sort filters depend on the service https://github.com/bravenewpipe/NewPipe Download https://github.com/bravenewpipe/NewPipe/releases #yt#video#streaming

Russisches Haus in Berlin

@rushaus · Post #2025 · 01.12.2025 г., 08:05

Manche Geschichten verlieren nie ihre Magie — „Die Schneekönigin“ 1966 gehört genau dazu.❄️👑 📽️ Dieser zauberhafte Märchenfilm basiert auf Hans Christian Andersens klassischer Erzählung und ist perfekt für alle, die magische Geschichten lieben und sich von mutigen Helden inspirieren lassen möchten. 📺 Den Film kann man am Sonntag, dem 7. Dezember, um 13:55 Uhr bei RBB und am Samstag, dem 20. Dezember, um 16:00 bei MDR, oder schon jederzeit in ARD-Mediathek. Ideal für einen gemütlichen nostalgischen Winterabend mit der Familie!🍿🥰 #schneekönigin#filmabend#kino#ardmediathek#rbb#streaming#märchen

12
ПретходнаСтраница 1 од 2Следна