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

Резултати

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

Пребарај: #microsoftcommunity

当前筛选 #microsoftcommunity清除筛选
MDC Uzbekistan

@mdcuzbekistan · Post #1026 · 21.11.2025 г., 20:18

✨Microsoft Community Conf 2025 — Full Agenda We’re just one day away from bringing together the brightest minds in AI, .NET, Cloud, DevOps, and engineering across Central Asia. Here’s what awaits you tomorrow: 🕘09:00–10:00 — Registration 🕙10:00–10:30 — Welcome Speech 🕥10:30–11:00 — Rising from Andijan to HP’s Executive Ranks — Mike Kuchkarov 🕚11:00–12:00 — MCP Economy — Nozim Turakulov 🕛12:00–13:00 — Developers’ Diary: Semantic Kernel & Agentic AI — Ildar Adilov 🕐13:00–14:30 — Lunch, Partner Activities & Group Photo 🕑14:30–15:00 — Microsoft Agent Framework — Alexander Trofimenko 🕒15:00–15:40 — Capacity & Performance Management in Tech Teams — Djahongir Makhkamov 🕓15:40–16:20 — Azure OpenAI, GitHub on Azure, GitHub Copilot — Yerlan Shokataev 🕔16:20–17:20 — Event-Driven Architectures with .NET & Azure — Erkin Mukhammedkulov 🕕17:20–18:00 — Closing Ceremony & Networking 😄 Sorry for the late-night post — midnight or not, the excitement for the event doesn’t wait! 📅 Date: November 22 📍 Location: Palace of Youth Creativity, Tashkent (Yoshlar Ijod Saroyi) ✅ Secure your spot: Register Now #MDCUConf2025#MicrosoftCommunity Telegram | Instagram | Website

MDC Uzbekistan

@mdcuzbekistan · Post #1025 · 21.11.2025 г., 14:33

🎤 Meet Our Speaker – Yerlan Shokatayev! We’re excited to welcome Yerlan Shokatayev, Microsoft Solutions Presales Engineer @ SOLVAS, to Microsoft Community Conf 2025! 🚀 Yerlan will deliver a highly anticipated session: "Azure Open AI, Github on Azure, Github Copilot" Get ready to explore the cutting-edge of AI and cloud development: - How Azure Open AI is transforming enterprise solutions - Practical workflows with GitHub on Azure - Tips, best practices, and actionable insights to leverage AI in software development 📅 November 22, 2025 📍 Palace of Youth Creativity, Tashkent ✅ Secure your spot: Register Now #MDCUConf2025#MicrosoftCommunity Telegram | Instagram | Website

MDC Uzbekistan

@mdcuzbekistan · Post #1021 · 21.11.2025 г., 12:04

🎤 Meet Our Speaker – Alexander Trofimenko! We’re excited to welcome Alexander Trofimenko, Senior Engineering Manager @ EPAM Systems, to Microsoft Community Conf 2025! 🚀 Alexander will take the stage with a highly anticipated and insightful session: “Microsoft Agent Framework” Get ready to dive deep into one of Microsoft’s most advanced technologies — from real-world applications to architecture patterns, best practices, and how this framework is shaping the future of intelligent systems. 📅 November 22, 2025 📍 Palace of Youth Creativity, Tashkent ✅ Secure your spot: Register Now More exciting speaker announcements are on the way — stay tuned! #MDCUConf2025#MicrosoftCommunity Telegram | Instagram | Website

MDC Uzbekistan

@mdcuzbekistan · Post #1020 · 21.11.2025 г., 10:20

🎥 Speaker Spotlight – Mike Kuchkarov (HP) We’re excited to share the official speaker video of Mike Kuchkarov, C-Level Leader | Vice President & CFO — Storage Business Unit @ HP! 🚀 In his upcoming talk, “Rising from Andijan to HP’s Executive Ranks,” Mike opens up about his journey from humble beginnings to becoming a global C-suite executive at one of the world’s most influential tech companies. His story is a powerful blend of ambition, resilience, and world-class leadership — a blueprint for anyone aiming to build a global career and lead at scale. 📅 November 22 ✅ Secure your spot: Register now #MDCUConf2025#MicrosoftCommunity Telegram | Instagram | Website

MDC Uzbekistan

@mdcuzbekistan · Post #1019 · 21.11.2025 г., 09:47

🎤 Meet Our Speaker – Mike Kuchkarov! We’re thrilled to announce Mike Kuchkarov, Vice President & CFO — Storage Business Unit @ HP, joining us at Microsoft Community Conf 2025! 🚀 Mike will take the stage with an inspiring and deeply personal session: “Rising from Andijan to HP’s Executive Ranks” A powerful story of ambition, resilience, and global leadership — and a rare chance to learn how a leader from Uzbekistan rose to one of the world’s most influential tech companies. 🔥 In his talk, expect insights on: - Breaking barriers and building a global career - Navigating leadership at scale - Managing transformation inside a Fortune 100 tech giant If you’re driven by growth, leadership, and building world-class tech teams, this is a session you cannot afford to miss. 📅 November 22, 2025 📍 Palace of Youth Creativity, Tashkent ✅ Secure your spot: Register Now More exciting speaker announcements are on the way — stay tuned! #MDCUConf2025#MicrosoftCommunity Telegram | Instagram | Website

MDC Uzbekistan

@mdcuzbekistan · Post #1017 · 20.11.2025 г., 18:01

📹 Speaker Video: Djakhongir Makhkamov Ex-Amazon | MIT-Certified CTO | COO @ U-Code Djakhongir will unpack how top engineering teams manage capacity, scale efficiently, and boost performance using real frameworks from global tech. Watch his message and get a preview of what’s coming at Microsoft Community Conf 2025. You don’t want to miss this session. 📅 November 22 ✅ Secure your spot: Register now #MDCUConf2025#MicrosoftCommunity Telegram | Instagram | Website

MDC Uzbekistan

@mdcuzbekistan · Post #1015 · 20.11.2025 г., 16:33

🎤 Meet Our Speaker – Djakhongir Makhkamov! We’re excited to welcome Djakhongir Makhkamov, Ex-Amazon, MIT certified CTO. Currently COO at U-Code (a Beeline/Veon subsidiary) 🚀 He will deliver a powerful session on “Capacity and Performance Management in Tech Teams” — a talk that dives into: - How high-performing engineering teams scale - Effective approaches to workload planning and team capacity - Performance management strategies used in modern tech organizations If you’re passionate about building efficient, scalable, and future-ready tech teams, this is one session you absolutely cannot miss. 📅 Date: November 22, 2025 📍 Location: Palace of Youth Creativity, Tashkent ✅ Secure your spot: Register Now More exciting speaker announcements are on the way — stay tuned! #MDCUConf2025#MicrosoftCommunity Telegram | Instagram | Website

MDC Uzbekistan

@mdcuzbekistan · Post #1014 · 20.11.2025 г., 15:13

📹 Speaker Video: Erkin Mukhammedkulov Engineering Manager @ EPAM Systems Erkin is bringing a deep dive into Event-Driven Architectures with .NET and Azure — how modern teams build scalable, resilient, production-ready systems. Watch his message and get a preview of what’s coming at Microsoft Community Conf 2025. You don’t want to miss this session. 📅 November 22 ✅ secure your spot: Register now #MDCUConf2025#MicrosoftCommunity Telegram | Instagram | Website

MDC Uzbekistan

@mdcuzbekistan · Post #1013 · 20.11.2025 г., 13:38

🎤 Meet Our Speaker – Erkin Mukhamedkulov! We’re thrilled to welcome Erkin Mukhamedkulov, Engineering Manager at EPAM Systems, to Microsoft Community Conf 2025! 🚀 He will present “Event-Driven Architectures with .NET and Azure: Building Resilient, Scalable Systems” — an exciting session exploring: The future of intelligent applications Modern cloud-first development How AI agents are transforming engineering If you’re passionate about cutting-edge tech, this is a session you cannot miss. 📅 Date: November 22, 2025 📍 Location: Palace of Youth Creativity, Tashkent ✅ Secure your spot: Register Now Stay tuned for more amazing speaker announcements! #MDCUConf2025#MicrosoftCommunity Telegram | Instagram | Website

MDC Uzbekistan

@mdcuzbekistan · Post #1012 · 20.11.2025 г., 08:37

🚨 Only 2 Days Left! Don’t miss your chance to join the Microsoft Developers Community Conference 2025! Connect, learn, and innovate with top tech leaders, developers, and community members. 📅 November 22 📍 Palace of Youth Creativity, Tashkent ✅ Secure your spot now: https://mdcuzbekistan.com/register #MDCUConf2025#MicrosoftCommunity Telegram | Instagram | Website

MDC Uzbekistan

@mdcuzbekistan · Post #1011 · 19.11.2025 г., 12:01

🎤Meet Our Speaker – Ildar Adilov! We're excited to welcome Ildar Adilov, Lead SWE at EPAM Systems, to Microsoft Community Conf 2025! 🚀 He will dive into "Developer's diary: Semantic Kernel and Agentic AI" — a powerful session exploring the future of intelligent apps, modern cloud-first development, and how AI agents are reshaping engineering. If you're passionate about next-gen tech, this is the session you cannot afford to miss. 📅 November 22, 2025 📍 Palace of Youth Creativity, Tashkent ✅ Secure your spot: Register Now Stay tuned for more speaker announcements! #MDCUConf2025#MicrosoftCommunity Telegram | Instagram | Website

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