TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #146 · 16 сеп.

Функция sub в regex может принимать функцию в качестве аргумента repl. 📄 Из документации: If repl is a function, it is called for every non-overlapping occurrence of pattern. The function takes a single match object argument, and returns the replacement string. То есть для каждого совпадения будет вызвана функция для вычисления замены вместо замены на одну и ту же строку для всех совпадений. Иными словами, для замены разных совпадений на разные строки не потребуется запускать re.sub() много раз для каждой строки замены. Достаточно определить функцию, которая вернёт строку для каждого из совпадений. Описание слишком запутанное🤔, давайте лучше рассмотрим на простом примере: Создаем карту замены. То есть какие строки на какие требуется менять. remap = { 'раз': '1', 'два': '2', 'три': '3', 'четыре': '4', 'пять': '5', } Пишем функцию поиска строки для замены. Единственным аргументом будет объект re.Match. Используя данные этого объекта мы вычисляем замену on-the-fly! def get_str(match: re.Match): word = match.group(1) return remap.get(word.lower()) or word Пример текста. text = '''Раз Два Три Четыре Пять Вместе будем мы считать Пять Четыре Три Два Раз Мы считать научим вас ''' Теперь запускаем re.sub и вместо строки замены (repl) подаём имя функции. (Данный паттерн ищет отдельные слова в тексте) >>> print(re.sub(r'(\w+)', get_str, text)) 1 2 3 4 5 Вместе будем мы считать 5 4 3 2 1 Мы считать научим вас Думаю, достаточно наглядно 🤓 #libs#regex

Hashtags

Резултати

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

Пребарај: #giftcrash

当前筛选 #giftcrash清除筛选
Telegram & TON NEWS

@all_telegram_ton_news · Post #22542 · 30.12.2025 г., 05:00

🚀TON Gifts Gambling Scene: Crash, Roulette & Pure Degen Plays – November 2025🚀 Hi degens! 🔥 You've mastered markets, stacked free daily wins, and lent Gifts for passive yields. Now enter the high-risk arena: apps where you bet Gifts (or TON) on crash, roulette, plinko, dice, or winner-takes-all pots. These are pure gambling.. house edge exists, volatility is brutal, most players lose long-term. Only play what you can afford to burn. No financial advice, just tools for responsible rebels. But for those who love the rush... here’s the hottest Gift gambling spots right now. All on TON, no KYC, instant action 🙈 ⚠️ Current Ecosystem Snapshot (Nov 21, 2025) - Gifts market cap stable ~$185-195M (down slightly from $202M summer peak but holding strong) - Stickers surging hard (600%+ YTD, ~$30M+ cap) but Gifts still 6-8x bigger - Limited drops & celebrity collabs still printing 50-300x for holders - TON NFT volume routinely top 3 chains globally – all fueled by Telegram's 1B users going degen 🎰 Top Gifts Gambling Apps (High Stakes Edition) 1. Rolls – Let's Fucking Roll 🎡 Winner-takes-ALL Gift pots! Deposit Gifts→ more valuable Gift = higher win chance. 2+ players trigger the roll. They also let you stake Gifts for +25% APR TON rewards (passive play). Pure adrenaline. https://t.me/rollsgame_bot/app?startapp=ref_izDyhtZZBA 2. Balls Plinko + Ball Escape madness. Drop balls, watch physics do the rest, win big on drops. https://t.me/myballs/app?startapp=ref_tzdt0z2l7bj 3. Bust'a Gift Classic crash but with Telegram Gifts on the line. Time your cashout or get rekt. https://t.me/bustagift_xbot/app?startapp=pal403954791 4. Epic Gift Crash game supporting both Gifts & TON bets. Also has daily free rolls (best of both worlds). https://t.me/epic_gift_bot/app?startapp=ref_JPFOFQ 5. Gift Phase Double, Dice, Spin Roulette. bet small, win your first (or next) Gift fast. https://t.me/GiftPhaseBot/GiftPhase?startapp=403954791 6. Pilot Clean crash game, TON only, super smooth multipliers. For the pure aviator lovers. https://t.me/BullApp_bot?start=403954791 7. GiftUp Crash + Crates opening. Unbox or ride the multiplier with your Gifts. https://t.me/GiftUpRobot?start=403954791 These apps move FAST.. new ones pop up, some get rugged, always check community sentiment in @DCH_Community before going hard. Remember rebels: Gambling is entertainment, not income. Stack on markets & lending for real alpha. But if you're feeling lucky and can handle the swing... LET’S FUCKING ROLL 🎲 What's your craziest win or worst rug story? Drop it in the chat – we learn together ✊ We are #TheRealDigitalResistance #TelegramGifts#TONGambling#GiftCrash#NoKYC#Web3Degen#PrivacyMatters