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

Резултати

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

Пребарај: #apy

当前筛选 #apy清除筛选
UXLINK

@uxlink_community · Post #180 · 13.01.2025 г., 06:14

Congrats #UXLINKseason1 stakers! After 6 months, $UXLINK price raised from $0.2 to $1.2, with nice #APY average on around 50%, you've got 750%+ ROI on average, the best investment in this market! Like @cz_binance said before, " If you hold, you will be rich! "💰 We will continue empower $UXLINK and reward our long term holders❤️https://x.com/UXLINKofficial/status/1878686684432486624

TONlines – News

@tonlines · Post #7331 · 22.05.2025 г., 16:35

The Daily TON: Understanding APY for Beginners #APY#network The Daily TON highlights the importance of understanding APY, advising newcomers to approach it with caution due to potentially misleading high rates. Services may use high APYs for marketing or short-term benefits, which might not result in significant long-term gains. Source: link @tonlines

Hashtags

🏦TON DeFi Yields & New Players Since the start of the year, 12 new DeFi protocols have launched, and developers are actively experimenting with solutions that combine the convenience of Telegram with the principles of decentralized finance. Top APRs: 🏆Bidaskoffers 22% APR in the tgUSD/USDT pair and 41.6% APR in Bemo bmTON/TON. 🏆TONCOprovides ~37.7% APR — among the highest yields on the platform. 🏆Storm Tradeoffers Vault to TON and USDT with yields of ~10–13% APR. 🏆FIVA Protocolhas revamped its app for simplicity and even added a game mode — 11.25% APR in USDT. New & Rising Projects: 🔓 Factorial has rebranded to Affluent, focusing on straightforward investment tools. 🔓 Titan introduced Colossus — a high-speed concentrated liquidity market-maker. 🔓Syde.fi launched an alpha version and is in testing; the team has gathered feedback and is about to unveil a new synthetic token-asset product. 🔓Swap.coffee opened Coffee DEX — a fully open-source decentralized exchange. 🔓Torch launched tgUSD, a stablecoin pegged 1:1 to USDT, offering ~10% APR. #DeFi#Yield#APR#APY#Farming#TON#Tonco#Bidask#Torch

Crypto M - Crypto News

@CryptoM · Post #65047 · 10.04.2026 г., 16:10

🚀 Whop Introduces Treasury Yield Product Following Tether Investment Whop has launched its Treasury yield product on March 25, following a significant investment from Tether in February, which valued the company at $1.6 billion. According to NS3.AI, the product was introduced after Tether's $200 million investment. Steven Schwartz noted that 3% of users engaged with the beta version within a week, despite the absence of a marketing campaign. The product channels funds through a Veda vault on Plasma into Aave lending markets, offering an annual percentage yield (APY) of up to 6%. The investment from Tether will enable Whop to integrate on-platform USDT wallets and payment options. #Whop#Tether#TreasuryYield#Investment#Crypto#APY#Aave#USDT#Fintech#Blockchain#AAVE

Ganar Dinero Seguro

@ganardineroseguro · Post #1236 · 20.10.2025 г., 00:03

💰 ¡NUEVA FUNCIONALIDAD: CUENTAS DE AHORRO EN 🔤🔤🔤🔤! 💰 🏦 Protege tu dinero de la inflación y hazlo crecer 🎯 QUEREMOS TU OPINIÓN ANTES DE LANZAR ✨ ¿Cómo funcionaría? 📈 APY: 3.75% - 4.10% anual 💵 Ahorra en QUSD - Protección contra inflación 🔓 Sin período de bloqueo - Retira cuando quieras 🚀 Lanzamiento: Noviembre 2025 🤔 PREGUNTA CLAVE: ¿Cómo prefieres recibir tus ganancias de ahorro? 📊 VOTA TU OPCIÓN FAVORITA EN LAS REACCIONES: 👍 DIARIAS - Ganancias acreditadas cada día ❤️ SEMANALES - Ganancias cada 7 días 🔥 MENSUALES - Ganancias cada mes 🥰 ANUALES - Ganancias al final del año 💡 Beneficios de las Cuentas de Ahorro QvaPay: ✅ Rendimiento garantizado - 3.75% a 4.10% APY ✅ Sin bloqueo de fondos - Liquidez total ✅ Protección contra inflación - Ahorra en QUSD ✅ Crecimiento automático - Tu dinero trabaja por ti ✅ Seguridad QvaPay - Respaldado por nuestra plataforma ✅ Flexibilidad total - Deposita y retira cuando quieras 🎯 Ejemplos de ganancias (APY 4%): 💵 Ahorras $100 → Ganas ~$4/año 💵 Ahorras $1,000 → Ganas ~$40/año 💵 Ahorras $10,000 → Ganas ~$400/año 📊 Según tu voto: • Diarias: Pequeñas ganancias constantes cada día • Semanales: Acumulación semanal visible • Mensuales: Crecimiento mensual significativo • Anuales: Máximo rendimiento al final del período 🚀 ¿Por qué es importante este producto? 💼 Para ti: Protege tu dinero y hazlo crecer 📈 Para QvaPay: Instrumento de crecimiento sostenible 🌟 Para todos: Ecosistema financiero más robusto 💬 ¡TU OPINIÓN DEFINE EL PRODUCTO! 👇 VOTA AHORA y ayúdanos a crear la mejor experiencia de ahorro 👇 🗓️ Lanzamiento previsto: Noviembre 2025 #QvaPay#CuentasDeAhorro#APY#QUSD#Ahorro#ProteccionInflacion#Noviembre2025#Encuesta#Inversion#CrecimientoFinanciero#SinBloqueo#Flexibilidad ⚡️Boost | 📱Twitter | 📱Instagram 🌟TrustPilot | ↔️Ofertas | 🤖Bot