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

Резултати

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

Пребарај: #coinbase

当前筛选 #coinbase清除筛选
Gong Jiao Wei 巩娇玮

@gongjiaoweiy · Post #69418 · 14.04.2026 г., 14:37

An OTC whale “0xd45” deposited 670 $cbBTC worth $50.19M into #Coinbase. The whale still holds 138,203 $ETH worth $329.33M and 3,000 $cbBTC worth $226.66M. https://intel.arkm.com/explorer/address/0xd4584bf988c9e8994688b56484e2f74ceaeefb20 https://x.com/OnchainLens/status/2044057234699891113 Follow @onchainlens for more onchain updates

Hashtags

Elf Crypto VIP

@elfcryptovip · Post #11606 · 03.06.2025 г., 11:54

BlackRock deposited 1,249.68 $BTC ($131.55M) into #Coinbase. In total, they deposited 5362.37 $BTC ($560.94M), in the past 2 days. They also withdrew 27,241.4 $ETH, worth $69.25M from #Coinbase. https://intel.arkm.com/explorer/entity/blackrock

Hashtags

Onchain Lens Channel

@OnchainLens · Post #6161 · 08.04.2026 г., 00:22

Blackrock withdrew 2,607 $BTC ($177.56M) and 28,391 $ETH ($59M) from #Coinbase. https://intel.arkm.com/explorer/entity/blackrock https://x.com/OnchainLens/status/2041673016653050293 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #6134 · 06.04.2026 г., 00:41

Over the past 2 hours, thomasg.eth (@thomasg_eth) has sold 4,700 $ETH for $9.67M $USDC and deposited 6,345 $ETH ($13.03M) into #Coinbase, losing ~$1.4M. He also sold 13,150 $AAVE for 364 $ETH ($750K) and $459,618 $USDC, and deposited it into #Coinbase. https://intel.arkm.com/explorer/entity/thomasg https://x.com/OnchainLens/status/2040952872805032291 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #6119 · 03.04.2026 г., 00:36

Grayscale withdrew 11,169 $ETH ($22.86M) and 150.4 $BTC ($10.07M) from #Coinbase, 6 hours ago. https://intel.arkm.com/explorer/entity/grayscale https://x.com/OnchainLens/status/2039864484282642605 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #6114 · 02.04.2026 г., 10:43

BlackRock deposited 1,360 $BTC ($90.28M) 15,103 and $ETH ($30.82M) into #Coinbase. https://intel.arkm.com/explorer/entity/blackrock https://x.com/OnchainLens/status/2039654986439926157 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #6060 · 27.03.2026 г., 10:20

BlackRock deposited 68,568 $ETH ($139.87M) and 612 $BTC ($41.4M) into #Coinbase https://intel.arkm.com/explorer/entity/blackrock https://x.com/OnchainLens/status/2037474772364443808 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #6044 · 26.03.2026 г., 11:26

Blackrock deposited 1,133.65 $BTC worth $78.83M and 15,405 $ETH ($32.02M) into #Coinbase and likely to deposit more. https://intel.arkm.com/explorer/entity/blackrock https://x.com/OnchainLens/status/2037128859217522960 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #6035 · 26.03.2026 г., 00:36

After a month of dormancy, a whale withdrew 11,999 $ETH (worth $26M) from #Coinbase and sent it for staking. Currently, the whale holds 22,618 $ETH ($49M), making a profit of $1.2M. Address: 0xd5549b9e07c1ff372b1a3912e184213bfe37bf25 https://x.com/OnchainLens/status/2036965329080062253 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #6021 · 25.03.2026 г., 01:39

13 hours ago, Clifton Collins, an Irish drug dealer, deposited 500 $BTC ($35.44M) into #Coinbase after nearly 10 years of being presumed lost. Collins bought 6,000 $BTC in 2011–2012 from the proceeds of growing and dealing weed, and split it across multiple wallets. After his 2017 arrest, the house was cleared out, and his belongings were sent to a landfill. https://intel.arkm.com/explorer/entity/clifton-collins https://x.com/OnchainLens/status/2036618949052571744 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #6017 · 25.03.2026 г., 00:56

BlackRock withdrew 2,267 $BTC worth $157.77M from #Coinbase in the past 10 hours. https://intel.arkm.com/explorer/entity/blackrock https://x.com/OnchainLens/status/2036608043862126958 Follow @onchainlens for more onchain updates

Hashtags

123•••10•••20•••2829
ПретходнаСтраница 1 од 29Следна