@inpdf · Post #7727 · 18.05.2026 г., 12:15
Champions #League All Stars - 2nd Ed. 🇬🇧 UK May 2026 #sport ⤵️@inPDF📬
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
Пребарај: #league
@inpdf · Post #7727 · 18.05.2026 г., 12:15
Champions #League All Stars - 2nd Ed. 🇬🇧 UK May 2026 #sport ⤵️@inPDF📬
@tonevents_en · Post #1025 · 27.11.2024 г., 10:11
🔔The New Year season of the Open League begins! 7th Season of The Open League starts today at 11:00 UTC. Anyone who wants to participate needs to get their #DeFi badges and read the terms of the rewards. The main focus of this season is liquidity💧 The season will last 20 days (from November 27 to December 17). The prize fund is $1.5M. The maximum reward for a participant is $1,000. Points can be earned in two categories: provided liquidity (TVL) and conducted trading turnover (Volume). The user's total points are the sum of the two categories. 💱Volume Points in this category are added for every $20 spent through League member projects. The dollar amount is calculated at the time of the exchange. ✔️GasPump — 5 points ✔️BigPump — 5 points ✔️Blum Mempad — 5 points ✔️TONPump — 5 points ✔️Wagmi — 5 points ✔️swap.coffee — 1 point ✔️Rainbow Swap — 1 point 🔒Liquidity | TVL Points in this category are added for every $20 invested in the liquidity of the sites that participate in the league. The dollar amount is calculated based on the value of the tokens at the end of the season. ✔️DAOLama — 15 points ✔️Aqua protocol — 15 points ✔️TonStable — 15 points ✔️TONCO — 10 points ✔️Coffin — 10 points ✔️JVault — 10 points ✔️Parraton — 10 points ✔️SettleTON — 10 points ✔️TonPools — 10 points ✔️TON Hedge — 10 points ✔️swap.coffee — 10 points for staking If you want to know how to get the most out of the season, join our chat for League tips. Leave your questions in the comments below this post. Get your badge now!🎁 #TON#SBT#AirDrop#League
@TFGames · Post #1794 · 02.01.2024 г., 09:25
#FEL#LEAGUE#GAMES https://testflight.apple.com/join/dzYEhXYw
@TestFlightX · Post #34760 · 01.12.2024 г., 10:16
#MONSTER#LEAGUE#FANTASY https://testflight.apple.com/join/7pBNJgK3
@TFGames · Post #2171 · 16.02.2024 г., 19:06
#RUMBLE#KONG#LEAGUE#GAMES https://testflight.apple.com/join/FKHsFUMi
@testflightynoti · Post #38088 · 12.05.2026 г., 18:35
#Zeebra#League#amp#Rankings Join the Zeebra - League & Rankings beta on ✈️#TestFlight 🔗 Link: https://testflight.apple.com/join/aSvp2czv Shared by Dimitri
@KartInfoTW · Post #294 · 09.10.2021 г., 08:16
今晚五點,韓服 2021 跑跑聯賽第二季總決賽開打! 團體賽是文浩俊經營的戰隊「BLADES」對上循環賽一場都沒輸過但準決賽輸給 BLADES 的「Liiv SANDBOX」,個人賽則是有柳昌賢、朴仁秀和李載赫等多位明星選手登場,相信這次決賽肯定會相當精采 🔥 🏁 聯賽資訊/獎勵:https://kinf.cc/aSKLe ▶️ 追蹤 Google 新聞:https://kinf.cc/gn ▶️ 立即加入 Discord:https://kinf.cc/dc #跑跑卡丁車#KartRider#韓服#聯賽#跑跑聯賽#League#冠軍賽#總決賽