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

Резултати

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

Пребарај: #bitfinex

当前筛选 #bitfinex清除筛选
Onchain Lens Channel

@OnchainLens · Post #5828 · 13.03.2026 г., 12:58

A whale has sold 2,311 $XAUT ($11.7M) for 5,313 $ETH ($11.33M) after holding it for 2 week via #Bitfinex. Address - 0xCE7E803F992106eCEbd9e833cE74c445EF2BdD42 https://x.com/OnchainLens/status/2032440990653661284 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5802 · 11.03.2026 г., 10:24

A freshly made wallet withdraw 738.38 $XAUT worth $3.8M from #Bitfinex https://intel.arkm.com/explorer/address/0xa64c560C37B9168183cB658d74d7d6c0a88FDEEc https://x.com/OnchainLens/status/2031677360941183247 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5592 · 23.02.2026 г., 08:55

A newly created wallet withdrew 500 $BTC worth $32.81M from #Bitfinex https://intel.arkm.com/explorer/address/bc1pkldc3d64ceqshhznxuj78r6e0a3p7gtdrrue07zmcq54xzlyuu9sppvxk0 https://x.com/OnchainLens/status/2025856881571557827 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5152 · 25.01.2026 г., 15:01

A newly created wallet received 25,001 $ETH worth $73.39M from #Bitfinex https://intel.arkm.com/explorer/address/0xa4eb173747e8C8252B6Ba56cE64C6D7631A36202 https://x.com/OnchainLens/status/2015439638102708547 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #4854 · 02.01.2026 г., 09:24

In the past 24 hours, a whale withdrew 800 $BTC, worth $70.9M, from #Bitfinex. Currently, the whale holds 1,000 $BTC, worth $89.04M, accumulated over the past 6 days. Address: bc1pckv9jvpnwgw67p02jfuxxcr0ycmlyk5xaj7atwsfu08u87t5srvqannw34 https://x.com/OnchainLens/status/2007020103993524510 Follow @onchainlens for more onchain updates

Hashtags

Криптач

@kripota4 · Post #2637 · 07.10.2025 г., 15:38

Гигантский кит «0x67f» около 3 часов назад внес еще 15 000 $ETH (70,15 млн $) на #Bitfinex. За последние 2 дня кит вывел 30 000 $ETH (138,4 млн $) на биржу по средней цене 4 612 $ и перевел 23 278 $ETH (109,3 млн $) в 2 новых кошелька. Текущие активы: 70 785 $ETH (332,4 млн $) на 4 кошельках.

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #1300 · 07.10.2025 г., 11:15

The giant whale “0x67f” above deposited another 15,000 $ETH ($70.15M) into #Bitfinex ~3 hours ago. Over the past 2 days, the whale has offloaded 30,000 $ETH ($138.4M) into the exchange at an average price of $4,612 and moved 23,278 $ETH ($109.3M) into 2 new wallets. Current holding: 70,785 $ETH ($332.4M) across 4 wallets. Watch out for more offloading activities from this giant whale with @spotonchain now! https://x.com/spotonchain/status/1975519812060426616

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #937 · 02.08.2024 г., 02:03

Fresh whale “bc1qh” withdrew 4,600 $BTC ($291M) from #Bitfinex at the dip in the past 8 hours! Recently, we also noticed 3 other whales (likely one entity) withdrawing 3,910 $BTC ($257M) from #Bitfinex since June 12, with the last accumulation only 3 days ago. Is some institution trying to accumulate $BTC? 🚀 Follow @spotonchain and set alerts for the 4 whales via this entity: https://platform.spotonchain.ai/en/entity/2234

Hashtags

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