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

Резултати

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

Пребарај: #usgovernment

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

@spotonchain · Post #1148 · 28.03.2025 г., 01:58

🇺🇸 The U.S Government moved 97.34 $BTC ($8.52M) and 884.3 $ETH ($1.78M) to new wallets in the past 8 hours! These funds were confiscated from Sae-Heng, a person involved in confidence scams. Currently, the #USGovernment still holds 198.4K $BTC ($17.3B) and 58K $ETH ($116M). Follow @spotonchain for more updates at https://x.com/spotonchain/status/1905438552164630944

SpotOnChain | Announcement

@spotonchain · Post #1070 · 09.01.2025 г., 02:37

🚨[BREAKING] The US 🇺🇸 Government has received approval to sell 69,370 $BTC (~$6.5B) seized from Silk Road! Note that previous sales did not directly impact the price, as they were done via OTC, but market panic often caused temporary drops. Currently, the US Government holds around 197K $BTC ($18.6B). Follow @spotonchain and track the #USGovernment now! 👉 Details: https://x.com/spotonchain/status/1877182579906068970

SIGNAL

@finsignal · Post #2928 · 29.02.2024 г., 14:01

The US government has transferred 15,085 🪙#BTC ($921M) to 2 new wallets. And #USGovernment currently controls 200.16K$BTC($12.3B)

SpotOnChain | Announcement

@spotonchain · Post #1307 · 14.10.2025 г., 11:03

💰 The #Bitcoin OG is currently sitting on another $22.6M unrealized profit from its $BTC short (10x). • Size: 4,394.74 $BTC ($484M) • Entry: $115,288.40 • Liquidation: $124,264.31 • Last added: 7 hours ago Meanwhile, 2 hours ago, the #USGovernment moved 667.62 $BTC ($74.8M) from seized Potapenko/ Turogin funds into a new wallet. No further movement yet, but $BTC has dropped by $1,420 since. Follow @spotonchain for more updates now! https://x.com/spotonchain/status/1978053536865988992

SpotOnChain | Announcement

@spotonchain · Post #1035 · 03.12.2024 г., 01:56

🚨 The #USGovernment moved 19,800 $BTC ($1.92B) out 8 hours ago, of which 10,000 $BTC ($962.9M) were sent to #Coinbase. So far in 2024, the US government has transferred a total of 25,999 $BTC (now: $2.49B) to Coinbase. However, these transfers appear to be custody actions rather than sales. Currently, the US government still holds approximately 183,850 $BTC ($17.57B) across various known addresses. Follow @spotonchain and check out more details at https://x.com/spotonchain/status/1863763869220647172

SpotOnChain | Announcement

@spotonchain · Post #881 · 27.06.2024 г., 01:54

The US Government moved another 3,940 $BTC ($241M) to #Coinbase Prime ~9 hours ago. Their last move was sending 2K $BTC ($131M) to Coinbase Prime on Apr 3, 2024 but it did not directly affect the BTC spot price. Currently, the US Government holds around 213.5K $BTC ($13B). Follow @spotonchain and monitor the #USGovernment entity via https://platform.spotonchain.ai/en/platform/entity/188

Michaël Van de Poppe Official

@michaelvandepoppeanalyst · Post #4473 · 15.08.2024 г., 07:16

The #USGovernment transferred 15,940 $BTC($966.4M) to #CoinbasePrime in three transactions this year. Within three days of the first two transfers, the price of $BTC both dropped by ~5%. https://platform.arkhamintelligence.com/explorer/tx/b614dd2e0fa06d776ee4d45973fab5ceb6e2dfebfb84e5f7bd45ef0975455240 https://platform.arkhamintelligence.com/explorer/tx/0f3f9a7c01d85c5747a3ae6cc9621cc30360390c4b681c1f95573e6bbcffed4f https://platform.arkhamintelligence.com/explorer/tx/a224c1658e4e4c1c0480312aea6c6102dbd5ec912810c799998a4d2f00741b0d

SpotOnChain | Announcement

@spotonchain · Post #920 · 23.07.2024 г., 01:37

The US Government deposited another 58.74 $BTC ($3.96M) to #CoinbasePrime 7 hours ago. So far in 2024, the US government has moved out 6,261 $BTC at an avg price of $62,538 ($392M), mostly after the price rose in late Feb. Among those tokens, 5,999 $BTC ($376M) went to Coinbase. The US government still holds 213K $BTC ($14.3B). Follow @spotonchain and set alerts for the #USGovernment now via https://platform.spotonchain.ai/en/platform/entity/188

Crypto M - Crypto News

@CryptoM · Post #65064 · 10.04.2026 г., 18:03

🚀 U.S. Government Budget Deficit Narrows in March The U.S. government reported a budget deficit of $164 billion in March. According to Jin10, this figure was slightly higher than the anticipated deficit of $156.7 billion but showed a significant improvement from the previous month's deficit of $308 billion. The narrowing of the deficit indicates a positive shift in the government's fiscal position compared to earlier projections. #USGovernment#BudgetDeficit#FiscalPolicy#Economy#March2026#GovernmentFinance#EconomicUpdate

Crypto M - Crypto News

@CryptoM · Post #64460 · 09.04.2026 г., 01:09

🚀 CZ Accepts Prosecution as Consequence of Scale, Looks Forward Despite Fairness Doubts Speaking on The Wolf of All Streets Podcast, Binance co-founder Changpeng Zhao (CZ) reflected on the fairness of his prosecution, drawing a parallel to the 1980s US War on Drugs — in which people received lengthy prison sentences for selling marijuana that is now legal in many states — to illustrate how legal standards shift over time. CZ said he believes Binance was the first major crypto platform targeted by the US government under the Biden administration because it was the largest, adding that he understands Senator Elizabeth Warren remains opposed to crypto. He characterized the question of fairness as subjective and said he does not dwell on it. "Is that fair or not? I don't think it matters that much," he said, adding that he is focused on looking forward and continuing to build. #Binance#ChangpengZhao#Crypto#Cryptocurrency#Prosecution#Legal#USGovernment#ElizabethWarren#Blockchain#Regulation#BNB

Venture Village Wall 🦄

@venturevillagewall · Post #3826 · 09.01.2025 г., 04:00

Binance Hits 250M Users, Record Stats Binance reports over 250 million registered users by year's end, a 47% increase. Platform processed 4.44M requests/second; VIP users up 116%, institutional users up 97%. Internal compliance team expanded to 650 experts. Read more US government clear to liquidate 69,000 Bitcoins (valued at $6.5B) seized from Silk Road. This follows a promise by the new administration not to sell the Bitcoins. Read more #Binance#Bitcoin#Crypto#Users#VIP#Institutional#Compliance#SilkRoad#Seizure#Finance#USGovernment#AnnualReport#MarketCap#Trading#Blockchain#Investments#Tech#DigitalCurrency#News

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