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

Резултати

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

Пребарај: #bitgo

当前筛选 #bitgo清除筛选
金色财经/币圈快讯7*24小时

@jinsebtc · Post #203879 · 11.05.2026 г., 03:16

特朗普官方Meme团队持仓钱包再次向某钱包转入 491.5 万枚TRUMP,约合 1209 万美元 【特朗普官方Meme团队持仓钱包再次向某钱包转入 491.5 万枚TRUMP,约合 1209 万美元】金色财经报道,5月11日,据Lookonchain监测,特朗普官方Meme团队持仓钱包刚刚再次向钱包 3S7zwP 转入 491.5 万枚 $TRUMP(约 1209 万美元)。 随后,钱包 3S7zwP 又向 #BitGo 存入了 700 万枚 $TRUMP(约 1722 万美元)。 交流群

Hashtags

Onchain Lens Channel

@OnchainLens · Post #6121 · 03.04.2026 г., 01:18

2 wallets received 1,781 $BTC worth $118.92M from #BitGo 4 hours ago. https://intel.arkm.com/explorer/address/bc1qsntkw2akr9qm2sktfng2wf4qhjw6rgwn9ezww72c5c0ms3sux0cq5hpwh5 https://intel.arkm.com/explorer/address/bc1qw5g4re8urj7t92wvhad88wgae6atcmle8sj4uu9hshglj3p60v8qlrpn73 https://x.com/OnchainLens/status/2039875054696345864 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #6100 · 01.04.2026 г., 15:11

Bitmine has bought 45,000 $ETH, worth $95.3M, from #BitGo. https://intel.arkm.com/explorer/address/0x9b72D128924E8B70CEb1512823630B9CBb1fE16c https://intel.arkm.com/explorer/address/0x8477E881571F791C2c8Deeefa0B15bD071052cEB https://x.com/OnchainLens/status/2039359922736095623 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #6037 · 26.03.2026 г., 01:01

Trump Meme Token team sent 6.97M $TRUMP worth $23.18M into #BitGo custody wallet and is likely to deposit in CEXs like before. Address: 3S7zwPM8AytWyHJ7zhS8H1mixQPD6nTu6yXEK4HCEd9D https://x.com/OnchainLens/status/2036971695169561079 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5876 · 17.03.2026 г., 00:54

A newly created wallet received 1.5M $TRUMP worth $5.86M from the #Bitgo Custody Wallet. Address: GVnRrkEurd9UEgVagsVaNQoR39XZaMsTQxCPD7Pkwha7 https://x.com/OnchainLens/status/2033708467861811375 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5694 · 03.03.2026 г., 05:04

2 newly created wallets received 1,124.57 $BTC worth $77.09M from #BitGo. - Wallet "bc1qy" received 726.08 $BTC worth $49.46M - Wallet "bc1qk" received 398.49 $BTC worth $27.63M https://intel.arkm.com/explorer/address/bc1qy0wfyh2gus85c3cq5pag3e3zath0mfltne8484zlklv0h82kqtvsafmm2j https://intel.arkm.com/explorer/address/bc1qkqds78fcj9pcyfxkxl4jdc3r3x64l2h0chqj6hh87pvu4qy39khqgw3paf https://x.com/OnchainLens/status/2028698046595559462 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5125 · 22.01.2026 г., 06:14

A newly created wallet received 6.27M $WLFI ($1.06M) and 324.85 $ETH ($980K) from #BitGo. Address: 0x55b9e02Fd210F2FB029EF4195a31550908580E6E https://x.com/OnchainLens/status/2014219983149273355 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #4914 · 06.01.2026 г., 08:11

A newly created wallet received 605.58 $BTC worth $56.51M from #BitGo https://intel.arkm.com/explorer/address/bc1q27nx5pffg8dhxa2vlxp7pfsskdz0cn7aax95eldm5d5r64exvjuqdq6lpx https://x.com/OnchainLens/status/2008451218126045660 Follow @onchainlens for more onchain updates

Hashtags

Ai 姨

@ai_9684xtpa · Post #3117 · 24.12.2025 г., 02:19

新地址过去 23 小时从 #Bitgo 处接收到 25131.6 $ETH ,价值 7476 万美元,提出价格 $2974.8,疑似归属于 Bitmine钱包地址 https://t.co/PDllsuJFG3https://t.co/wXUmzX4KO9 ————— 链上小说家,关心天气、食物、还有故事。@ai_9684xtpa

Hashtags

Onchain Lens Channel

@OnchainLens · Post #4746 · 23.12.2025 г., 16:25

Bitmine (@BitMNR) has further bought 29,463 $ETH, worth $88.2M, from #BitGo and #Kraken. - The newly created wallet "0xecA" received 18,454 $ETH, valued at $55.61M, from #BitGo. - Wallet "0x1b6" withdrew an additional 11,009 $ETH, valued at $33.14M, from…

Onchain Lens Channel

@OnchainLens · Post #4739 · 23.12.2025 г., 02:50

Bitmine (@BitMNR) has further bought 29,463 $ETH, worth $88.2M, from #BitGo and #Kraken. - The newly created wallet "0xecA" received 18,454 $ETH, valued at $55.61M, from #BitGo. - Wallet "0x1b6" withdrew an additional 11,009 $ETH, valued at $33.14M, from #Kraken. It now holds 24,421 $ETH, valued at $73.12M. Addresses: - 0xecA84b8599A5e11d6b600F24a0F42703E1D4c3eA - 0x1b6E316c4d3093bbf8182Cf2fa76Be4611df0a8A https://x.com/OnchainLens/status/2003296928566771813 Follow @onchainlens for more onchain updates

Onchain Lens Channel

@OnchainLens · Post #5527 · 18.02.2026 г., 01:50

Trump Meme Team Allocation Wallet sent 5.267M $TRUMP, worth $22.44M, into a #BitGo Custody wallet. Are we selling via OTC? https://solscan.io/account/AduisyNJFAxo49tDQmJUN7Ujc2xAmgmfjJqTaPptPUU4#transfers https://x.com/OnchainLens/status/2018495068852871321…

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