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

Резултати

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

Пребарај: #aoj

当前筛选 #aoj清除筛选
bjjfanaticsinstructionals

@bjjfanaticsinstructionals · Post #1904 · 05.01.2026 г., 19:38

🔥NEW RELEASE🔥 😁Shutting Down The De La Riva by Tainan Dalpra😁 ➡️In this Masterclass, 3x world champion Tainan Dalpra breaks down a complete system for Shutting Down the De La Riva guard. The series includes 31 instructional classes, focusing on positional understanding, key concepts, and troubleshooting common reactions while addressing the most common de la riva controls. ➡️Tainan Dalpra is a 3x IBJJF world champion and one of the most dominant competitors of his generation. A standout figure in modern jiu jitsu, he is known for a dynamic passing game that blends speed, control, and precision - earning him recognition as one of the best guard passers in the sport. $179😍$14.99😍 ❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️ 📱Payment: 📱📱📱 💰Submeta FOR FREE 👑MasterClass ✈️@bjjfanaticsinstructionals #TainanDalpra#Passing#Gi#AOJ 💁‍♀️Buy 💁‍♀️

bjjfanaticsinstructionals

@bjjfanaticsinstructionals · Post #1855 · 13.08.2025 г., 18:30

🔥NEW RELEASE🔥 😁Colored Belt Blueprint by Cole Abate😁 ➡️THE COLORED BELT BLUEPRINT IS A REFLECTION OF COLE'S JOURNEY THROUGH THE RANKS, BEGINNING WITH THE KIDS' BELTS TO COMPETING AT THE HIGHEST LEVELS OF THE SPORT AND BECOMING A 2024 BLACK BELT NOGI WORLD CHAMPION. COLE'S STORY SERVES AS BOTH AN INSPIRATION AND A GUIDE FOR PRACTITIONERS AT EVERY STAGE OF THEIR JOURNEY. ➡️THE MASTERCLASS SERIES INCLUDES 56 TOTAL TECHNIQUE VIDEOS AND IN-DEPTH INTERVIEWS, ORGANIZED BY BELT LEVEL. COLE SHARES HIS EXPERIENCE AND PROVIDES INSIGHTS INTO HOW THESE TECHNIQUES CONTRIBUTED TO HIS GROWTH AND HELPED HIM OVERCOME CHALLENGES ALONG THE WAY. $219😍$19.99😍 ❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️ 📱Payment: 📱📱📱 💰Submeta FOR FREE 🌈UFC Picks 👑MasterClass ✈️@bjjfanaticsinstructionals #ColeAbate#AOJ#NoGi#ArtOfJiuJitsu 💁‍♀️Buy 💁‍♀️

bjjfanaticsinstructionals

@bjjfanaticsinstructionals · Post #1826 · 12.06.2025 г., 14:58

🔥NEW RELEASE🔥 😁Duck Under Masterclass by Cole Abate😁 ➡️The Duck Under combines pressure and speed, blending the control of traditional passing with the tempo and sharpness of the modern game, allowing the guard passer to dictate the pace of the fight. ➡️The Masterclass includes more than 5+ hours of entries, concepts, transitions, and submissions. Throughout the 40 classes, Cole demonstrates the effectiveness of the position, and how the Duck Under completely neutralizes the guard player by removing their ability to setup sweeps or submissions. $̶1̶7̶9̶😍$19.99😍 ❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️ 📱Payment: 📱📱📱 💰Submeta FOR FREE 🌈UFC Picks 👑MasterClass ✈️@bjjfanaticsinstructionals #ColeAbate#GuardPassing#Gi#AOJ 💁‍♀️Buy 💁‍♀️

bjjfanaticsinstructionals

@bjjfanaticsinstructionals · Post #1817 · 24.05.2025 г., 00:04

🔥NEW RELEASE🔥 😁X Guard Masterclass 2.0 By Tainan Dalpra😁 ➡️X Guard 2.0, the second installment to Tainan's X Guard system, builds on the framework with updated details, introduces new positions, and explores variations and adjustments to the X Guard. ➡️Positions and topics for the series include: from the open guard using the cross sleeve, the 2-on-1 control, from the reverse de la riva, incorporating the leg drag, finishing with the waiter sweep, and more. ➡️In this series, Tainan pulls inspiration from Rafael Mendes' leg drag, and focuses a lot on incorporating the leg drag technique and position into his X Guard system. $200😍$19.99😍 ❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️ 📱Payment: 📱📱📱 💰Submeta FOR FREE 🌈UFC Picks 👑MasterClass ✈️@bjjfanaticsinstructionals #TainanDalpra#Guard#XGuard#AOJ 💁‍♀️Buy 💁‍♀️

bjjfanaticsinstructionals

@bjjfanaticsinstructionals · Post #1856 · 13.08.2025 г., 18:33

🔥NEW RELEASE🔥 😁Kids Guard Retention by Gui Mendes and Tainan Dalpra😁 ➡️KIDS GUARD RETENTION IS THE DEBUT MASTERCLASS SERIES ON THE AOJ+ PLATFORM THAT IS DESIGNED FOR KID PRACTITIONERS. IT'S BUILT ON THE SAME PROVEN SYSTEM THAT HAS DEVELOPED ELITE LEVEL KIDS AND ALLOWED AOJ TO ACHIEVE 1ST PLACE OVERALL AT THE 2025 IBJJF PAN KIDS CHAMPIONSHIP. ➡️THE SERIES IS TAUGHT BY 4X WORLD CHAMPION GUI MENDES AND 3X WORLD CHAMPION TAINAN DALPRA, AND GIVES YOUNG PRACTITIONERS THE TOOLS AND CONFIDENCE TO DEFEND, RECOVER, AND BUILD A STRONG GUARD, STARTING WITH THE FUNDAMENTALS. $199😍$19.99😍 ❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️ 📱Payment: 📱📱📱 💰Submeta FOR FREE 🌈UFC Picks 👑MasterClass ✈️@bjjfanaticsinstructionals #TainanDalpra#AOJ#GuiMendes#ArtOfJiuJitsu 💁‍♀️Buy 💁‍♀️

bjjfanaticsinstructionals

@bjjfanaticsinstructionals · Post #1774 · 27.02.2025 г., 00:40

😁When & How: Pressure Pass Versus Speed Pass (Seminar In Spain)😁 ➡️An on demand series from Tainab Dalpra & Gui Mendes filmed during their recent seminar in spain. ➡️The 90+ minute session includes techniques from both Tainan & Gui, and focuses specifically on when and how to use pressure pass versus speed pass. ➡️The seminar includes many of the key concepts taught as part of the AOJ academy curriculum and finishes with a Q&A session, answering questions from the students in attendance. $49😍$4.99😍 ❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️ 📱Payment: 📱📱📱 💰Submeta FOR FREE 🌈UFC Picks 👑MasterClass ✈️@bjjfanaticsinstructionals #AOJ#ArtOfJiuJitsu#TainanDalpra#GuiMendes 💁‍♀️Buy 💁‍♀️

bjjfanaticsinstructionals

@bjjfanaticsinstructionals · Post #1867 · 08.10.2025 г., 22:53

🔥NEW RELEASE🔥 😁K Guard Masterclass by Cole Abate😁 ➡️THE NEWEST MASTERCLASS SERIES FROM COLE ABATE INCLUDES MORE THAN 4.5 HOURS OF INSTRUCTIONAL CONTENT COVERING THE K GUARD POSITION BY DETAILING THE FUNDAMENTALS, MULTIPLE ENTRIES, SWEEPING WITH THE POSITION, AND SUBMISSIONS. ➡️THE SERIES ALSO FEATURES INSIGHT FROM 4X WORLD CHAMPION GUI MENDES AND AN INTERACTIVE PRIVATE LESSON WITH TWO OF AOJ'S TOP GREEN BELT STUDENTS. $199😍$19.99😍 ❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️ 📱Payment: 📱📱📱 💰Submeta FOR FREE 🌈UFC Picks 👑MasterClass ✈️@bjjfanaticsinstructionals #ColeAbate#AOJ#GuiMendes#ArtOfJiuJitsu 💁‍♀️Buy 💁‍♀️