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

Резултати

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

Пребарај: #tap2earn

当前筛选 #tap2earn清除筛选
Pirate Clash Official Channel

@PirateClashChannel · Post #154 · 24.07.2024 г., 07:14

🤝 Partnership: DejenDog X Pirate Frenzy We’re super thrilled to announce our collaboration with DejenDog, a #Tap2Earn game based on Telegram and incubated by HashKeyWeb3. Hit to earn $HIT and get a chance to win additional $HSK. They’re launching a 10 Million $HSK Airdrop campaign on DejenDog 🪂 ️🎉 As the Official Airdrop channel for the $HSK program, DejenDog will offer our community an extra 300,000 $HIT per player. 👉 Head over to the DejenDog Mini App to claim yer eligible $HSK tokens:https://t.me/DejenDogBot?start=d02e7d44 👉 DejenDog Channel: https://t.me/DejenNews - - - Website | Twitter | TG Channel | TG Community | Discord • Pirate Frenzy (Play-To-Airdrop Mini App on Telegram) • Pirate Clash (Extension directly playable on Twitter)

Hashtags

Pirate Clash Official Channel

@PirateClashChannel · Post #121 · 09.07.2024 г., 17:52

🤝 Partnership: Mappasaurus X Pirate Frenzy We are pleased to announce our collaboration with Mappasaurus, leveraging advanced AI and decentralized tech to develop a dynamic, constantly evolving global map. 🦖 Crackasaurus is their TON-based #Tap2Earn game where tapping earns you $CRACKA, the in-game currency. Climb the leagues to unlock unique NFTs with special benefits in the Mappasaurus ecosystem. 🤑Tap to Earn with Crackasaurus now: https://t.me/MappasaurusAppBot/Crackasaurus?startapp=piratefrenzybot Check out for more details: https://x.com/PirateClash_HQ/status/1810730983471350090 - - - Website | Twitter | TG Channel | TG Community | Discord • Pirate Frenzy (Play-To-Airdrop Mini App on Telegram) • Pirate Clash (Extension directly playable on Twitter)

Hashtags

ABRO

@drgems_official · Post #93 · 28.07.2024 г., 05:24

New Listing OFFICIAL - $AVACN@avagoldcoin 🔹 Pair: AVACN/USDT 🔹 Deposit: Open NOW 🔹 Trading starts: July 30, 10:00 AM (UTC) Join Bitgets #Tap2Earn $AVACN campaign to celebrate the listing! Get a 5% daily boost on your deposit to #Bitget and earn $20 AVACN with a simple daily tap. 🚀 How to join? ☑️ Use the AVACOIN bot and complete #Bitget tasks: t.me/avagoldcoin_bot 👉 First sign up here: https://bonus.bitget.com/ALAA4W 👉 Then learn more here: https://www.bitget.com/events/tap-to-earn-more

G-AGENTS AI 🤖 | News

@gametynews · Post #232 · 27.07.2024 г., 07:16

🚀 Exciting Partnership Announcement! We're thrilled to join forces with GPTWars, the first AAA game on ton blockchain! Get ready to infiltrate, survive, and restore balance together. This marks a new era in gaming innovation and community engagement. Stay tuned for more updates and epic adventures! 📲Join our awesome crew on Discord and stay updated on news: https://discord.gg/metafighter Tweet 🔗:https://x.com/gametyio/status/1817096006208471440 Like, RT and comment the post to make some noise 📎Important Links: Website | X | Chat | Discord | Announcement | Youtube #tap2earn#play2earn

G-AGENTS AI 🤖 | News

@gametynews · Post #231 · 26.07.2024 г., 09:05

📢 Exciting Partnership Announcement! We’re thrilled to announce that Gamety is now partnered with ElfinGames, the 1st GameFi Omni Layer focused on eSports! 👾 ✨ Elfin Metaverse, backed by @BinanceLabs, is an all-in-one eSports gaming platform and open-world metaverse built on Elfin Lands, a virtual realm that offers a unique gaming experience and a thriving community! 🤝 Elfin Metaverse is joining the Gamety Fam with co-campaigns, AMAs and other fun community events. 📢 Stay tuned for any future updates on Gamety and the Elfin Lands. Use Gamety unique invitation code: https://elfinmetaverse.com/?inviteCode=9XYZUC20 to earn more in Elfin Metaverse! 📲Join our awesome crew on Discord and stay updated on news: https://discord.gg/metafighter Tweet 🔗:https://x.com/gametyio/status/1816761387005116529 Like, RT and comment the post to make some noise 📎Important Links: Website | X | Chat | Discord | Announcement | Youtube #tap2earn#play2earn

Mappasaurus Official Channel

@mappasaurusofficial · Post #225 · 06.04.2025 г., 14:13

🔥 We've reached an incredible milestone of 100,000 Gamers in our#Tap2Earngame and the Fun's just starting 🚀 The best#Rewardsand#Opportunitiesare yet to come. Don’t miss out on this adventure. 🕹️Play#Crackasauruson @Telegram, invite your friends and earn$CRACKA, while shaping the future of mapping. 🦖 Dinos, Should we celebrate this with a#MEMEcontest where the funniest one wins? 🤑Join the Game here: @MappasaurusAppBot 𝕏 Click to share it with your friend 👀Follow us on: Twitter | Instagram | Medium | Youtube | Linkedin | Earn

🪙1 DAY to $TOMA The team announced decision to allocate 80% of entire $TOMA supply to community members😄😄😄 The team believes that the users should receive the majority share. After all, without users, there is no project — your support is what made #Tomarket possible. A few key details to keep in mind over the next couple of days. Read them carefully: ✔️ The countdown ends October 31st at 23:59 HRS. Be sure you’re ready because this is when we’ll lock in your $TOMA allocation. Reach the highest level you can — every bit counts. ✔️ For accurate $TOMA allocations, the game will undergo a 24-hour maintenance period after the snapshot. Most features will go offline, giving us the time we need to finalize each allocation and remove any unwanted bots or bad actors. ✔️ Note that at this point, level upgrades, payment functions (TON stars, payments with #TON), and activity for $TOMATO or referral counts will be stopped. ✔️ You’ll be able to view your $TOMA balance after November 2nd 00:00 HRS (GMT+8). $TOMA is seriously coming. And this is just the beginning. See you in about 28 hours. Tomarket Team Those who have achieved at least🏅Gold + Medal Owner🎖 might find there's a little extra waiting for them... The last call guys, LFG!!😄 #Airdrop#TGE#listing#BitgetWallet#Web3#TON#Tap2Earn

Go! Announcements

@gorwachain_announcements · Post #506 · 25.08.2024 г., 21:30

There's a lot to be made by tapping and claiming coins from the Go! Ton App! Get started Here: https://t.me/thegoprojectBot This bot is your free pass to Sweet rewards, get started Now. Once you get started, you've got to maintain your spot as a weekly and monthly active user. Here's why: 🔹 There are more rewards as you get more active 🔹 You get features nobody else gets 🔹 You get into higher ranks which means exclusive airdrops will be sent to you. 🔹 You get access to collectibles reserved just for you 🔹 You get to Contribute more to the community, and influence the direction of the project Ready to start Tapping? Let's Go: https://t.me/thegoprojectBot #gotonapp#tap2earn#bot#rewards#boost#wealth Join: 🐣X✉️Chat✉️News🤖Discord Play: 🕹️TON App💻Web App Info: 🖥Newsletter🌐Website🌐Blog