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 слични објави

Пребарај: #bitwise

当前筛选 #bitwise清除筛选
SpotOnChain | Announcement

@spotonchain · Post #1029 · 26.11.2024 г., 05:54

🇺🇸 Spot ETF: 🔴$435.3M to $BTC and 🟢$2.9M to $ETH 🗓️ Nov 25, 2024 👉 BTC ETFs saw a heavy net outflow again after 5 days of strong inflows, as the BTC price plunged to a low of $92,800. 👉 Specifically, #Bitwise experienced its largest outflow since launch yesterday, at $280.7M. 👉 ETH ETFs, on the other hand, have maintained net inflows over the past 2 trading days, as the ETH price appears to be rising. Follow @spotonchain and check out the latest updates about #Bitcoin and #Ethereum#ETFs via https://platform.spotonchain.ai/en/signal-details/us-bitcoin-and-ethereum-etf-net-inflows-update-on-november-25-2024-229979

PaxosGlobal

@PaxosGlobal · Post #9 · 05.04.2019 г., 14:56

Curious how Paxos thinks about regulation in #crypto and the future of #blockchain? Especially given the recent #Bitwise research? Take a read through Part 2 of our regulation series and learn how Paxos stands out from the rest https://medium.com/paxos/putting-facts-into-perspective-the-paxos-view-a1155f57f17b

SpotOnChain | Announcement

@spotonchain · Post #993 · 10.10.2024 г., 12:20

🇺🇸 Spot ETF: 🔴$40.5M to $BTC and ⚪️$0(tentative) to $ETH 🗓️ Oct 9, 2024 👉 This does not include data from #Bitwise (ETHW), which has seen daily flows ranging from -$4.5M to $5.4M over the past 30 trading days. 👉 BTC ETFs have had negative net flows for 2 days, while ETH ETFs have been stagnant for 3 days. 👉#BlackRock (IBIT) remained the only one among 20 BTC and ETH ETFs with inflows yesterday, adding 637 $BTC ($39.7M). Follow @spotonchain and check out the latest updates about #Bitcoin and #Ethereum#ETFs via https://platform.spotonchain.ai/en/signal-details/us-bitcoin-and-ethereum-etf-net-inflows-update-on-october-9-2024-188958

SpotOnChain | Announcement

@spotonchain · Post #1014 · 05.11.2024 г., 05:16

⚠️U.S. BTC ETFs faced a record $540.9M outflow just before the election—the second largest ever! Notably, #21Shares (ARKB) and #Bitwise (BITB) had their largest outflows since launch. Meanwhile, #BlackRock (IBIT) was the only ETF with an inflow of 569 $BTC ($38.6M). Last week (Oct 28–Nov 1), BTC ETFs saw a massive $2.22B net inflow over 4/5 days, while ETH ETFs had a $13M net inflow on 3/5 days. 👉 Details: https://x.com/spotonchain/status/1853663826723717611

SpotOnChain | Announcement

@spotonchain · Post #1021 · 15.11.2024 г., 04:35

🇺🇸 Spot ETF: 🔴$399.6M to $BTC and 🔴$3.1M to $ETH 🗓️ Nov 14, 2024 👉 This is the 3rd-largest net outflow ever for the 11 US BTC ETFs. 👉 Both #21Shares (ARKB) and #Bitwise (BITB) recorded new largest outflows since launch, surpassing previous lows of $138.3M and $79.8M, respectively, on Nov 4. Follow @spotonchain and check out the latest updates about #Bitcoin and #Ethereum#ETFs via https://platform.spotonchain.ai/en/signal-details/us-bitcoin-and-ethereum-etf-net-inflows-update-on-november-14-2024-218273

SpotOnChain | Announcement

@spotonchain · Post #924 · 24.07.2024 г., 04:10

🚨 US #ETF 23 JUL: -$78M to $BTC and +$107M to $ETH 🌟 BTC ETF UPDATE (final): -$78M • This is the first negative net flow in the past 13 trading days. • Only #BlackRock (IBIT) had an inflow today. 🌟 ETH ETF UPDATE (final): +$107M • Around 5.3% of the $ETH held by #Grayscale (ETHE) left the fund on just the first trading day. • #BlackRock (ETHA) and #Bitwise (ETHW) saw strong inflows of over $200M. Follow @spotonchain and check out the latest updates about #Bitcoin and #Ethereum ETFs via https://platform.spotonchain.ai/signal-details?id=149526

🤣📊以太全球新聞EthereumGlobalNews 📆 2025-10-11📈鏈上數據追蹤快訊📈 🤣【Bitwise:加密情緒指數觸發強烈反向買入訊號】 即時加密資產情緒指數(Cryptoasset Sentiment Index)剛剛釋出明確的反向買入訊號。 #Bitwise#CryptoSentiment#ContrarianSignal#市場情緒

🇺🇸📊 以太全球新聞 📆 2025-10-10 EthereumGlobalNews 📊 ETF 市場動態 🗽👀#SOL#ETF Bitwise 已修訂其 Solana ETF 申請,正式在基金名稱中加入「Staking」,並公開相關費用。該 ETF 將收取 0.20% 的管理費,前 三個月 以及首 10 億美元 資產管理規模內 免收費用。 #SOLStakingETF#Bitwise#ETF費用#市場動向觀察

Crypto M - Crypto News

@CryptoM · Post #65121 · 11.04.2026 г., 05:47

🚀 Solana Spot ETFs See Significant Inflows Amid Market Activity U.S. Solana spot ETFs experienced a notable increase in net inflows, totaling $11.453 million yesterday. According to NS3.AI, the Bitwise Solana Staking ETF was the sole fund contributing to these net inflows, highlighting its appeal among investors. #Solana#SpotETFs#Investing#Cryptocurrency#Bitwise#MarketActivity#ETFInflows

Mexc Crypto Signals Pumps Trading Kucoin

@mexc_signals_pumps_trading · Post #1114 · 26.05.2024 г., 08:01

🚨 Breaking News: On May 24th, U.S. Bitcoin spot ETFs saw a net inflow of approximately $252 million, marking 10 consecutive trading days of inflows. BlackRock IBIT received $182 million, Fidelity FBTC $44 million, Bitwise BITB $6.4 million, and Ark 21Shares Bitcoin $4 million! 📈💼💰 #Bitcoin#ETFs#BlackRock#Fidelity#Bitwise#ArkInvest#CryptoNews

🇪🇺🥳 以太全球新聞 📆 2025-10-11 EthereumGlobalNews📈鏈上數據追蹤 📢【歐洲主權基金正式配置 Bitwise 比特幣 ETF】 據消息指出,歐洲某主權財富基金已開放投資管道,正式納入 Bitwise 比特幣 ETF(#BTC#ETF) 作為其資產配置的一部分。 📈 機構資金的加入,有望為 BTC 價格帶來長期支撐,同時加強整體加密資產的主流化趨勢。 #BTC#ETF#Bitwise#主權基金#比特幣ETF#歐洲市場#機構資金進場

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