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

Резултати

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

Пребарај: #vanilla

当前筛选 #vanilla清除筛选
Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #656 · 27.07.2025 г., 18:35

Lineage OS - Official | Nothing Phone (2) ✍️ Details: - Version: 22.2 - Codename: #Pong - Initial Build: 27/07/25 - Build Freq: Weeklies (Search for #Pong) 🔽 Download: ROM & Images | GAPPS (sideload) | Unofficial MicroG Builds ⚙️ Wiki: Here 🤝 Thanks: Here 📓 Reference: Here 🔖 Tags: #ROM#LOS#Official#V#Vanilla ❌ Known quirks: - Device Integrity ~ As always thanks Goolag! 👤 Maintainer: @Chandu_078 🐙 Chat: @NothingPhone2 🔔 Updates: @NothingPhone2Updates

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #737 · 03.05.2026 г., 08:58

halogenOS - Official | Android 16 | Nothing Phone (2) ✍️ Details: - Version: 16.2 - Codename: #Pong - Updated: 26/05/02 - Type: #Vanilla 🔽 Download: Here 🆘 Support : Here ⚙️ Installation: Here 🔖 Tags : #ROM#AOSP#Official#XOS ✍️ Changelog: - Dimmed mode - New launcher app drawer design - Slidable tiles - Battery charge limit - Add font customization - Add centered lockscreen clock style - Add VRR mode - April 2026 Security Patch - Increase Bluetooth sound quality when using AAC or SBC ✍️ Note: - Firmware is not included, based on NOS B4.0-251226-1110 - ROM is signed by official halogenOS keys. GApps support and PI not guaranteed (only vanilla with Sandboxed Play is officially supported). 🏆 Credits: - Chandu - Pong dev team & testers - halogenOS Community 👤 Maintainer : @N0m4n904 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #679 · 26.09.2025 г., 05:51

HalogenOS - Official | Android 16 | Nothing Phone (2) ✍️ Details: - Version: 16.0 - Codename: #Pong - Initial Release: 25/09/25 - Type: #Vanilla 🔽 Download: Here 🆘 Support : Here ⚙️ Installation: Here 🔖 Tags : #ROM#AOSP#Official#XOS ✍️ Note: - Kernel is prepatched KSU - Firmware is not included, latest is recommended - ROM is signed by official halogenOS keys. GApps support and PI not guaranteed (only vanilla is officially supported). - Refer to this post for future updates related to the ROM. 🏆 Credits: - Chandu for Kernel (and DT which served as as a reference) - Pong dev team & Testers 👤 Maintainer : @N0m4n904 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #663 · 18.08.2025 г., 04:23

HalogenOS - Official | Android 16 | Nothing Phone (2) ✍️ Details: - Version: 16.0 - Codename: #Pong - Initial Release: 18/08/25 - Type: #Vanilla 🔽 Download: Here 🆘 Support : Here ⚙️ Installation: Here 🔖 Tags : #ROM#AOSP#Official#XOS ✍️ Note: - Kernel is prepatched KSU - Firmware is not included, latest is recommended - ROM is signed by official halogenOS keys. GApps support and PI not guaranteed (only vanilla is officially supported). - Refer to this post for future updates related to the ROM. 🏆 Credits: - Chandu for Kernel (and DT which served as as a reference) - @chrome6boy for testing - Pong dev team 👤 Maintainer : @N0m4n904 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #525 · 23.01.2025 г., 11:46

Lineage OS - Unofficial | Android 15 | Nothing Phone (2) ✍️ Details: - Version: 22.1 - Codename: #Pong - Released: 23/1/24 🔽 Download: ROM & Images | Gapps (sideload) ⚙️ Installation: Here 🔖 Tags : #ROM#LOS#Unofficial#V#Vanilla ✨Changelog: - Initial build based on Android 15 and NOS V3.0-250113-1723 - https://t.me/NothingPhone2updates/528 👤 Dev: @Chandu_Dyavanapelli 🐙 Chat @NothingPhone2 🔔 Updates @NothingPhone2Updates

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #696 · 28.11.2025 г., 08:19

AviumUI - Unofficial | Android 16 | Nothing Phone (2) 📝 Details: - Version: 16 - Build type: #Vanilla - Device: #Pong - Released: 27/11/2025 ⬇️ Downloads: Here 📖 Changelogs: Here 🖼️ Screenshota: Here 🏷 Tags: #Avium#ROM#Avium#Vanilla#Unofficial ✍️Notes: - Vanilla build ONLY - Initial Nothing camera support available - SukiSU Ultra and SusFS baked in - OTA updates are planned in the future, however not supported as of now - Signed with my keys - Based on Lineage DT, Vendor and Kernel - Use latest NOS 3 firmware - If face any bugs report with logs 🏆Credits: - Deadlylxrd for so much help with building my first ever ROM - Chandu for DT - Fabian & HELLBOY for Glyph 👤 Maintainer: @sevo9128 💬 Chat: @NothingPhone2 🔔 Updates: @NothingPhone2Updates

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #626 · 05.06.2025 г., 14:26

Bliss - Official | Android 15 | Nothing Phone (2) ✍️ Details: - Version: 18.6 - Codename: #Pong - Released: 02/06/2025 - Type: #Vanilla 🔽Download:Here | Mirror | Gapps 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here 🔖 Tags : #ROM#AOSP#Official#Bliss#V ✨ ChangelogsROM | Device ✍️ Note: - Clean flash recommended - KSU disabled bcs of official requirements 🏆 Credits - @Ghosuto7 for DT - Hellboy for Meteoric kernel - Fabian for PA Glyph Implementation - Testers 👤 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Oneplus 13 Updates

@OnePlus13Series · Post #373 · 24.01.2026 г., 03:52

LineageOS - Official | Android 16 | Oneplus 13 ✍️ Details: - Version: 23 - Codename: #dodge - Variant: #Vanilla - Released: 23 Jan 🔽 Download : Here | Gapps 📃 Changelogs: Here ⚙️ Installation: Here 🌳 Sources: DT | Kernel 🔖 Tags: #LOS#Official#ROM#Baklava 📔 Notes: Broken: eSim, Device Integrity 👤 Maintainers: @bgcngm, chandu078, dianlujitao, ItsVixano 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Notalone

@notalonecosmetics · Post #38 · 06.03.2025 г., 13:26

Лучше выбери свой аромат в парфюмированных гелях NOTALONE, которые привлекают любовь! Vanilla Lovers - влюбленность Black pepper Neroli- страсть Bergamot Amber Wood - глубина #notalone#парфюмированныйгельдлядуша#blackpepper#vanilla#bergamot

Oneplus 13 Updates

@OnePlus13Series · Post #351 · 13.11.2025 г., 15:52

crDroid - Official | Android 16 | Oneplus 13 ✍️ Details: - Version: 12 - Codename: #dodge - Variant: #Vanilla - Released: 02/11/25 🔽 Download : ROM | Images ⚙️ Installation: Here 👨‍🍳 Features: Here 🔖 Tags: #crDroid#Official#ROM#Baklava 📔 Changelogs: • Initial Release • Working: Everything! • Broken: NA ✍️Notes: • Sideload Gapps Pixel version for Google Experience Crdroid version for minimal gapps 🌳Sources: https://github.com/crdroidandroid/android_kernel_oneplus_sm8750 https://github.com/crdroidandroid/android_device_oneplus_dodge https://github.com/crdroidandroid/android_device_oneplus_sm8750-common 🏆Credits • Sauron for the banner 👤 Dev: @neobuddy89 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #713 · 13.02.2026 г., 04:29

Lineage OS - Official | Android 16 | Nothing Phone (2) ✍️ Details: - Version: 23.2 - Codename: #Pong - Initial Build: 10/02/26 - Build Freq: Weeklies (Search for #Pong) 🔽 Download: ROM & Images | GAPPS (sideload) | Unofficial MicroG Builds ⚙️ Wiki: Here 📔 Changelogs: Here 🤝 CF Participants: Here | Ref 🔖 Tags: #ROM#LOS#Official#Baklava#Vanilla ❌ Known quirks: - Device Integrity ~ As always thanks Goolag! 👤 Dev: chandu078 🐙 Chat: @NothingPhone2 🔔 Updates: @NothingPhone2Updates

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #356 · 17.07.2024 г., 17:27

LineageOS - Community | A14 | Nothing Phone (2) ✍️ Details: - Version: 21.0 - Codename: #Pong - Released: 17/07/2024 🔽 Download : Recovery | Fastboot ⚙️ Installation: Here 📸 Screenshots: Here 🆘 Support: Telegram 🔖 Tags : #ROM#Vanilla#Community#LOS#QPR3#U#NothingPhone2 ✍️ Changelog - Update from NOS 2.6.0 - USB OTG Fixed - Fixed Status Bar Padding - Read Notes 👇 ✍️ Notes - Flash These GAPPS to get Gapps with Pixel Launcher - Stable Signed Build - Meteoric kernel is baked in with prepatched KSU. - Dolby Atmos Included 🏆 Credits - Chandu for base device tree - HellboyforMeteoric kernel - Miki, Unluck & Ghost for all help - Fabian for PA Glyph Implementation 😎 Maintainer: @Kartikey 🔔 Updates: @NothingPhone2Updates 💬 Chat: @NothingPhone2

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