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

Резултати

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

Пребарај: #wintermute

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

@OnchainLens · Post #5788 · 10.03.2026 г., 04:13

A whale sent 75 $BTC ($5.08M) and bought 2.067B $PUMP ($4.04M) from #Wintermute in the past 20 hours. Address: 24BLFjSAcUPPWs8F7nhwthfRPvh5mopNYfu5WXTkLChr https://x.com/OnchainLens/status/2031221755700981916 Follow @OnchainLens for more Onchain Updates.

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5261 · 01.02.2026 г., 01:00

The whale "0xFB7" has further bought 10,000 $ETH for $26.36M from #WinterMute. This brings the whale's holdings to 120,169 $ETH, valued at $294.79M in staking. Address: 0xFB78AA8F38843629e89951D9db6FdC398d75e0A3 https://x.com/OnchainLens/status/2017765248162488573 Follow @OnchainLens for more Onchain Updates.

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5099 · 20.01.2026 г., 23:54

The whale "0xfb7" closed a $BTC long position with a loss of $3.7M, withdrew all the funds, and deposited $31.7M $USDC into #Wintermute and bought 10,000 $ETH Later converted it into $stETH, and sent it to another wallet where the whale holds 40,060 $stETH…

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #985 · 27.09.2024 г., 09:54

$NEIRO (Neiro Ethereum) seems to be in an accumulation phase according to our latest on-chain data: 1/ Whale 0x6ab accumulated 17.7M $NEIRO in the last 7 days at an average price of $0.086. 2/ Whale 0x9Ba bought 17.5M $NEIRO on Sept 6 at $0.154. While profitable with $FET, this whale hasn’t fared as well with meme coins. 3/ Whale 0xAB5 accumulated 6M $NEIRO, DCAing over the past month at $0.128, having made good profits with $PEPE in the past. 4/ Whale 0x1ED accumulated 8.6M $NEIRO at $0.116, has sold some without profit, and now holds 5.6M. It has previously profited from $ETHFI, $SYN, and $PENDLE. 5/ Lastly, #Wintermute, a market maker, continues to hold a large amount of 52.97M $NEIRO ($4.97M), ~5.3% of the total supply. With a market cap still under $100M and recent signs of increased decentralization in the past weeks, will Binance consider listing it on spot after all 🧐? Details: https://x.com/spotonchain/status/1839596800031998301

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5169 · 26.01.2026 г., 11:36

Whales/Institutions are accumulating $ETH - A newly created wallet "0xcA0" bought 61,000 $ETH worth $171.15M from #Binance. - The whale "0xFB7" further bought 20,000 $ETH worth $56.13M from #WinterMute and now holds 100,130 $ETH worth $283.79M. Addresses:…

Onchain Lens Channel

@OnchainLens · Post #5156 · 26.01.2026 г., 00:30

Whales/Institutions are accumulating $ETH - A newly created wallet "0xcA0" bought 61,000 $ETH worth $171.15M from #Binance. - The whale "0xFB7" further bought 20,000 $ETH worth $56.13M from #WinterMute and now holds 100,130 $ETH worth $283.79M. Addresses: - 0xcA08371f6e9204Dd6927dcc2dB5504EA062b2998 - 0xFB78AA8F38843629e89951D9db6FdC398d75e0A3 https://x.com/OnchainLens/status/2015582948632965245 Follow @onchainlens for more onchain updates

SpotOnChain | Announcement

@spotonchain · Post #918 · 22.07.2024 г., 01:41

Multisign 0xbba (likely @MakerDAO) deposited the last 628 $MKR ($1.76M) to #Binance via wallet 0x1cc 8hrs ago! Over the past 4 months, this multisign deposited all 30,971 $MKR to Binance and #Wintermute at ~$2,972 ($92M), causing price dips each time. While multisign 0xbba is now out of $MKR, another likely multisign 0x7fd of MakerDAO, which once used wallet 0x1cc, may soon unload its current 5,177 $MKR ($15.1M). Follow @spotonchain and check out the mentioned addresses at: 1. 1. Multisign 0xbba: 0xbba4c8eb57df16c4cfabe4e9a3ab697a3e0c65d8 2. Multisign 0x7fd: 0x7fda46250dbc2eb3a24d11374dd1380ce69e75e4

Onchain Lens Channel

@OnchainLens · Post #5282 · 02.02.2026 г., 04:01

The whale "0xFB7" has further bought 15,642 $ETH ($36.24M) and 10 $cbBTC ($777.58k) from #WinterMute and #Coinbase. This brings the whale's holdings to 135,822 $ETH, valued at $313.55M. Address: 0xFB78AA8F38843629e89951D9db6FdC398d75e0A3 https://x.com/…

Onchain Lens Channel

@OnchainLens · Post #5279 · 02.02.2026 г., 00:45

The whale "0xFB7" has further bought 15,642 $ETH ($36.24M) and 10 $cbBTC ($777.58k) from #WinterMute and #Coinbase. This brings the whale's holdings to 135,822 $ETH, valued at $313.55M. Address: 0xFB78AA8F38843629e89951D9db6FdC398d75e0A3 https://x.com/i/status/2018123212178239573 Follow @OnchainLens for more Onchain Updates.

Onchain Lens Channel

@OnchainLens · Post #4805 · 29.12.2025 г., 00:45

A whale withdrew 2,218 $ETH ($6.52M), 37.1M $SKY ($2.36M), and 4,772 $AAVE ($730.36K) from #Kraken 7 hours ago. The wallet received 519 $ETH ($1.62M) from #WinterMute 19 days ago. In total, it holds 2,738 $ETH ($8.07M). Address: 0xcd9eb5783e2620762f47bf0a7d09c531225b5507 https://x.com/OnchainLens/status/2005439635170721971 Follow @onchainlens for more onchain updates

Onchain Lens Channel

@OnchainLens · Post #5132 · 23.01.2026 г., 00:03

The whale "0xfb7" has further bought 10,000 $ETH ($28.9M) from #WinterMute and also sent $58.13M to #FalconX likely to buy more $ETH. The whale now holds 60,098 $ETH, worth $179.22M. Addresses: - 0xfb78aa8f38843629e89951d9db6fdc398d75e0a3 - 0xd4584bf98…

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