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

Резултати

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

Пребарај: #godl

当前筛选 #godl清除筛选
Maximus Trade 🌕

@MaximusTrade1 · Post #10418 · 22.08.2025 г., 09:47

RoOLZ скоро запускает новую игру. Они создали ИИ - агента в телеграм и анонсируют его в ближайшее время. Аудитория у проекта около 1 млн человек. Капитализация: 130 000$. Ticker DEX: #GODL

Hashtags

TONlines – News

@tonlines · Post #6780 · 15.04.2025 г., 15:29

RoOLZ Gods & Mortals: Comput3 Airdrop Announcement #Comput3#GODL RoOLZ Gods & Mortals advises $GODL stakers to prepare for the upcoming Comput3 Airdrop. Participants can stake $GODL in the new pools and finish Comput3 tasks to qualify. Source: link @tonlines

TONlines – News

@tonlines · Post #6975 · 30.04.2025 г., 06:36

⚡️RoOLZ Gods & Mortals Joins Forces with Meme Bean #GODL#Meme RoOLZ Gods & Mortals has announced its core partnership with Meme Bean, where entertainment meets crypto tokens. The partnership offers tokendrops for game participants and bonus points for $GODL stakers, inviting users to explore Meme Beans for thrilling rewards. Source: link @tonlines

Hashtags

🚀 ✅$GODL GODL is showing strong bullish momentum right now. Buyers are stepping in, volume is rising, and the chart is moving in a clear uptrend. 💸Increasing social hype 💸Strong community engagement 💸Fresh buyers entering 💸Momentum breaking key levels Dex. https://dexscreener.com/solana/7LFWN87jocBQ252sk6QDQ7T1QyLuq12bnUR5qDUFR4kY CA. GodL6KZ9uuUoQwELggtVzQkKmU1LfqmDokPibPeDKkhF 🔗 Official Links 🔍Website: https://www.godl.supply/ ✉️Telegram: https://t.me/mineGODL 🐣X (Twitter):https://x.com/GODLsuppl #GODL#Crypto#Solana#Blockchain#CryptoNews

😈The game has been brought to ROolZ! 🔥The gameplay is an unusual #clicker, where you gain experience points while you fight against the same person, who echoes whom and who has a more powerful NFT. 💎 Points for #GODL quests will be equal to $GODL token at launch. ✅ Go to @ROoLZQuest_bot ✅ Connect a TON-wallet ✅ Complete all tasks ✅ If you have ROoLZ NFT — stake them and get 6 points daily for each #NFT 😈Let's fight against each other! ⚡️Boost | 🌐Twitter

ℹ️ Roolz: Exchange Claim of Airdrop this week! #Roolz announced the #TGE date and listing. There are four top tier exchanges where you can claim your #GODL. November 7 🔥The Airdrop Claim is upon us! You can see your GODL amount in the app. No rush, you’ll be able to claim in the app for 60 days. After this Claim Phase you can still claim $GODL in your wallet and stake it for rewards in the app. ❗️Be careful in adding all right info. Otherwise your $GODL is lost. 🔮Community Sale $GODL Vouchers These are not in the claim! You’ll be send GODL to your voucher wallet 15 minutes before TGE. 🎁 If you have a very low Claim Amount you can join a raffle for 4.000.000 GODL — 100 Winners. 📈All Exchange Info Create an account on your favorite exchange in advance or use your existing one to be ready totrade. Deposit your $GODL to the one #CEX from the list: 📈KuCoin • Exchange UID How to find my KuCoin Id? • GODL Address & Memo How to find a Deposit Address & Memo 💱BitGet • Exchange UID How to find my BitGet UID • GODL Address & Memo How to find Deposit address on BitGet 📈MexC • Exchange UID How to find Exchange ID • GODL Address & Memo How to find Deposit address & Memo on MexC 💰Gate.io • Exchange UID How to find Gateio Account ID • GODL Address & Memo How to find your GODL address on Gate 🔥Claim in the App on the Airdrop Page 🎁 There is one more opportunity for you guys — support the 50 TGE Quests and get a 🎁 ticket in a 800,000 $GODL raffle. Keep Calm & HODL GODL🐲

$GODL is Listed Now 💯 Direct to CEX: 💰 Gate: gate.io/GODL-USDT 📈 Kucoin: kucoin.com/GODL-USDT 📈 MEXC: mexc.com/GODL-USDT 💱 BitGet: bitget.com/GODL-USDT Direct to DEX: 🪨 STONfi: app.ston.fi/swap/TON/GODL Wait for 💯 #GODL#listing#trade#spot#airdrop