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

Резултати

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

Пребарај: #cryptoexchange

当前筛选 #cryptoexchange清除筛选
Propheta Indicator Signals

@propheta_indicator · Post #23762 · 22.04.2026 г., 10:25

👀 Well, would you look at that! 👆 Reached 9th TP in just 1 day in the VIP PRO channel! $609 in profits with a 5% entry and a $1000 deposit! 🤑 All this profit could have been yours! 🔥ACCESS TO MANUAL TRADING for 70usdt/month 👉 Love the profits you're seeing, but can't afford the VIP cost? Earn over $40 per one recommendation with zero risk using our referral program! Click the link, then START >>> Referral Program Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #cryptoexchange#cryptobot#autotrading

Propheta Indicator Signals

@propheta_indicator · Post #23611 · 29.03.2026 г., 22:47

Reached 9th TP in the VIP PRO channel! Easy $604 with a 5% entry and a $1000 deposit! That's why we call it the "Money Printer" 💴💷💵ACCESS TO MANUAL TRADING for 70usdt/month 🏆Flex your skills with Propheta AI Analyzer: smart AI analysis flips the market upside down, fast tweaks fit any style, and it’s your wingman for snagging top-tier trades! GET THE ACCESS Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #cryptoexchange#tradingview#crypto

Propheta Indicator Signals

@propheta_indicator · Post #22870 · 07.10.2025 г., 17:42

👆 Propheta living up to its name yet again 🔮 Reached 9th TP in just 20 hours in the VIP PRO channel! You could've earned $402 with a 5% entry and a $1000 deposit! 🤑 All this profit could have been yours! 🔥ACCESS TO MANUAL TRADING for 70usdt/month 🏆Flex your skills with Propheta AI Analyzer: smart AI analysis flips the market upside down, fast tweaks fit any style, and it’s your wingman for snagging top-tier trades! GET THE ACCESS Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #CryptoSignal#bitcoinnews#cryptoexchange

Propheta Indicator Signals

@propheta_indicator · Post #23727 · 17.04.2026 г., 00:03

Oops, we did it again 🤣 Reached 9th TP in just 17 hours in the VIP PRO channel! Easy $609 with a 5% entry and a $1000 deposit! VIPs getting filthy rich by the day ☺️🤑🤑ACCESS TO MANUAL TRADING for 70usdt/month 👉 We know how to earn 3-4-5 digit amounts without any deposit, with zero risk! Click the link, then START >>> Referral Program Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #cryptoexchange#ethereum#tradingbot

Propheta Indicator Signals

@propheta_indicator · Post #23443 · 07.03.2026 г., 06:39

👆 Propheta living up to its name yet again 🔮 Reached 9th TP in the VIP HTL channel! $185 in profits with a 5% entry and a $1000 deposit! VIPs getting filthy rich by the day ☺️🤑🤑ACCESS TO MANUAL TRADING for 70usdt/month 👉 OOooh yeah baby! And that's what we do every day! Every day milking those exchanges dry! Waiting for you: t.me/ProphetaAdmin_bot Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #ethereum#cryptoexchange#cryptocurrency

DigitalGenie Trading News

@digitalgentop · Post #114 · 24.05.2024 г., 19:21

☄️🔖South Korean Police Crack Down on Crypto Fraud: 19 Arrested in 'Reading Room' Scam 🛡 South Korean police have made a major breakthrough in the fight against crypto fraud, apprehending 19 individuals involved in a deceptive "crypto reading room" scheme. 🔈 The gang operated through an open chat room, masquerading as seasoned traders and luring in unsuspecting investors seeking legitimate crypto advice. 💵However, instead of guidance, victims were duped out of a staggering $18.8 million by the cunning fraudsters. 🌐 Despite the arrests, the investigation is far from over, with at least six suspects still on the run. International cooperation through Interpol has been sought to bring them to justice. ❗️ Shockingly, the ringleader employed manipulative tactics akin to pig-butchering, promising jobs abroad only to exploit vulnerable individuals who fell into their trap. #Cryptosignals#Cryptoinvesting #Cryptoexchange #Bitcoinprice

Propheta Indicator Signals

@propheta_indicator · Post #23774 · 06.05.2026 г., 12:28

👆 Propheta living up to its name yet again 🔮 #ENAUSDT reached 9th TP in under 2 days! Signal from our VIP PRO channel! Easy $606 with a 5% entry and a $1000 deposit! That's why we call it the "Money Printer" 💴💷💵ACCESS TO MANUAL TRADING for 70usdt/month 👉 Get dozens of signals like these daily! Subscribe now >>> t.me/ProphetaAdmin_bot Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #signalchannel#cryptoexchange#bitcoinnews

Propheta Indicator Signals

@propheta_indicator · Post #23066 · 17.11.2025 г., 10:38

#BABYUSDT has achieved 9th TP in our VIP HTL channel! With a 5% entry and a $1000 deposit, you could've earned $302! VIPs getting filthy rich by the day ☺️🤑🤑ACCESS TO MANUAL TRADING for 70usdt/month ⚡️Speed up your trading with Propheta AI Signals: real-time precision signals, elite-level automation, and Cornix integration — the future of trading is now! GET THE ACCESS TO AI SIGNALS Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #tradingviewindicator#ethereum#cryptoexchange

Propheta Indicator Signals

@propheta_indicator · Post #23265 · 04.01.2026 г., 14:21

#MEWUSDT has achieved 9th TP in 11 hours in our VIP HTL channel! Every day we're on fire! 🔥🔥🔥ACCESS TO MANUAL TRADING for 70usdt/month 👉 In our VIP community, not only will your deposit grow, but your skill as a trader as well! Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #cryptoexchange#eth#ethereum

DigitalGenie Trading News

@digitalgentop · Post #112 · 24.05.2024 г., 18:40

🌐 Former Kansas Bank CEO Pleads Guilty to $47M Crypto Embezzlement Scheme 💵 In a shocking turn of events, the ex-CEO of Heartland Tri-State Bank in Kansas has confessed to embezzling a staggering $47.1 million through a web of personal crypto purchases. 🕯 The fallout from this audacious scheme resulted in the bank's collapse last July, leaving investors with zero equity, according to the U.S. Attorney's Office for the District of Kansas. 📣 Identified as Shan Hanes, the 52-year-old mastermind behind this financial fiasco allegedly used cryptocurrencies as a smokescreen to hide mounting losses. 💬 "Hanes is not just a liar but also a master manipulator," stated Attorney Kate Brubacher, emphasizing the devastating impact on victims' life savings and retirement funds. 🛡 The FBI, FDIC, Federal Reserve Board, and FHFA are now jointly investigating this high-profile crypto case that has sent shockwaves through the industry. ✨ With a potential sentence of up to 30 years looming over him, Hanes awaits his fate at the sentencing scheduled for August 8th. 🟢The collapse of Heartland Tri-State Bank adds another layer to the ongoing debate about how traditional banks should navigate their relationship with the ever-evolving crypto ecosystem. #Bitcointrading#Cryptosignals#Cryptoinvesting #Cryptoexchange #Bitcoinprice

123•••1011
ПретходнаСтраница 1 од 11Следна