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

Резултати

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

Пребарај: #alexamods

当前筛选 #alexamods清除筛选
Alexa Mods

@itsmealexaliza · Post #1151 · 18.03.2025 г., 09:53

🚀 Bible AI 1.2.4 [Pro Subscribed] – Premium Unlocked! 📖 AI-powered Bible study companion with instant scripture insights, AI explanations, and devotionals – all unlocked! ✨ Features: ✅ [Pro Subscribed] – Full premium access. ✅📖 AI-Powered Insights – Instant verse explanations. ✅🎧 Audio Bible & Offline Mode – Listen and read anywhere. ✅🌙 Dark Mode & Smart Search – Enhanced reading experience. ✅📝 Notes & Highlights – Save and organize scriptures. ⚠️ Play Protect Warning? Disable Play Protect, install APK, then re-enable for security. 🚀 Pro Unlocks Automatically When Using AI Features! 🔗 Join Our Telegram for Updates & Mods: 👉 AlexaMods Telegram 📥 Download & Enjoy Full Access! #BibleAI#ProUnlocked#AlexaMods

Alexa Mods

@itsmealexaliza · Post #1168 · 01.07.2025 г., 04:42

🚀 Thunder VPN 5.3.10 [VIP + Pro Unlocked] – Ad-Free + Full Speed! ⚡️ Fast & Secure VPN for Unlimited Browsing – No Ads, No Limits! ✨ Features: ✅ [VIP + Pro Unlocked] – All servers & premium features active ✅🌐 Ultra-Fast Speed – Stream, game & browse smoothly ✅🔒 Military-Grade Encryption – Protects your data ✅🚫 No Logs & No Tracking – 100% private ✅🌓 Dark Mode – Clean & easy interface ✅🌍 Global Servers – Bypass geo-restrictions ⚠️ Play Protect Warning? 🛡️ 100% Verified – No Play Protect Warning! 📡 VIP & Pro Unlocked Automatically – No Login Needed! 🔗 Join Our Telegram for Updates & Mods: 👉 AlexaMods Telegram https://t.me/itsmealexaliza 📥 Download & Enjoy Limitless VPN Access! #ThunderVPN#ProUnlocked#VIPAccess#AlexaMods

Alexa Mods

@itsmealexaliza · Post #1202 · 30.08.2025 г., 08:59

#Request Mod– Multi App [VIP] 📦 Package Name: com.waxmoon.ma.gp 🎯 Version/Build: 20512 📱 Architecture: ARM64 ✨ MOD Features: ✅ VIP/Premium Always Active 🚫 Ads Fully Removed 🔁 Full Access Unlocked 💰 No Coins / No Subscriptions 👑 Modded by: AlexaMods 🔗 Telegram: @alexaliza #MODINFO#VIPUnlocked#AdsRemoved#AlexaMods#MultiApp 📱 Official App (Play Store): ⚠️ Note: If any warning appears, it is only due to encryption. It is not malware, trojan, or virus.

Alexa Mods

@itsmealexaliza · Post #1195 · 27.07.2025 г., 04:48

🚀 AlexaMods – 360加固 Killer Service 🔥 Are you struggling with 360加固-protected APKs? We provide exclusive 360加固 Killer service – the latest 2025 protection layer (July 2025) can only be bypassed by AlexaMods! 💎What We Offer: • 🔐Latest 360加固 Signature Kill & Repack (2025-07-21 update). • ⚡Advanced Obfuscation & Protection Bypass. • 🛡Safe Repacking – Play Protect Verified. • 🎯Custom APK Modding & VIP Features Unlock 📢 Need Help? DM @alexaliza on Telegram for private services, pricing, and more information. 🔥Why AlexaMods? • Trusted 360加固 bypass expert. • 100% manual crack – not script-based. • Works with all major Android architectures (ARM64, ARMv7, x86). #AlexaMods#360加固#APKProtection#SignatureKill#VIPMods#AndroidSecurity

Alexa Mods

@itsmealexaliza · Post #1194 · 27.07.2025 г., 03:29

HappyMod 3.2.1 [ADSFREE + VIP + x86 + MODDED] App Info: - Version: 3.2.1 - Architecture: ARMv7 | ARM64-v8a | x86 - Release Date: 2025-07-21 (Latest 360加固) - Size: 20 MB - Modder: alexaliza [AlexaMods] MOD Features: - Unlimited Downloads – No speed or file limits. - Ads Free – Clean interface without ads. - VIP Unlocked – Access all premium & exclusive content. - Latest 360加固 2025-07-21 Signature Killed & Repacked. - Premium Mods Access – Thousands of exclusive modded apps/games. - 100% Safe – Play Protect Verified (No malware or trojans). About HappyMod: HappyMod is the #1 platform for modded Android apps and games, offering verified, safe, and premium APKs with exclusive features. Join Our Telegram for Updates: https://t.me/itsmealexaliza #HappyMod#ModAPK#VIPUnlocked#AlexaMods#ADFree#AndroidMods#ARM64#ARMv7#x86#UnlimitedDownloads