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

Резултати

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

Пребарај: #mt5

当前筛选 #mt5清除筛选
Daily Channels

@dailychannels · Post #6126 · 09.06.2025 г., 01:00

Channel: Best Forex Indicators and robots for MT4/MT5. Dolphintrader.com. Members: ~2.62K 💢 Username: @dolphintraders Description: Forex indicators, robots and trading systems for Metatrader 4 and MT5 🏷 Tags: #crypto_fx_trading #forex#mt4#mt5#indicators#signals https://telegramchannels.me/channels/dolphintraders

SS7 TRADER

@ss7trader · Post #30790 · 11.05.2026 г., 16:18

⚙100% NON-REPAINT. 0% GUESSING.⚙ 👉Look at these clean entries from today's session with Pro Thunder V12. Once the signal appears, it STAYS. No shifting, no disappearing, just pure accuracy. 👉Neural Network Logic: Our AI scans thousands of data points to find the highest probability reversal. 📈Result: See the screenshots for the clinical precision. Stop losing money on lagging indicators. It’s time to upgrade to the V12 standard.👑 👇 GET YOUR COPY NOW 👇 👉CLICK TO GET V12 NOW! #MT5#Indicator#binaryindicator#pocketoption#quotex#бинарныеопционы#бинарныеопционы

SS7 TRADER

@ss7trader · Post #30745 · 06.05.2026 г., 12:09

⚡️V12 STRIKES AGAIN! ⚡️ Another Perfect Signal on EUR/GBP. 👉 Neural Confirmed 👉 100% Non-Repaint 👉 Pure Profit Stop losing to lagging indicators. Join the ss7trader revolution today. 👑 👇GET ACCESS 👇 https://ss7trader.com/product/pro-thunder-v12/ #MT5#Indicator#binaryindicator#pocketoption#quotex#бинарныеопционы#бинарныеопционы

SS7 TRADER

@ss7trader · Post #30693 · 29.04.2026 г., 14:49

⚡️V12 STRIKES AGAIN! ⚡️ Another Perfect Signal on GBP/JPY. 👉 Neural Confirmed 👉 100% Non-Repaint 👉 Pure Profit Stop losing to lagging indicators. Join the ss7trader revolution today. 👑 👇GET ACCESS 👇 https://ss7trader.com/product/pro-thunder-v12/ #MT5#Indicator#binaryindicator#pocketoption#quotex#бинарныеопционы#бинарныеопционы

SS7 TRADER

@ss7trader · Post #30643 · 27.04.2026 г., 12:36

⚙100% NON-REPAINT. 0% GUESSING.⚙ 👉Look at these clean entries from today's session with Pro Thunder V12. Once the signal appears, it STAYS. No shifting, no disappearing, just pure accuracy. 👉Neural Network Logic: Our AI scans thousands of data points to find the highest probability reversal. 📈Result: See the screenshots for the clinical precision. Stop losing money on lagging indicators. It’s time to upgrade to the V12 standard.👑 👇 GET YOUR COPY NOW 👇 👉CLICK TO GET V12 NOW! #MT5#Indicator#binaryindicator#pocketoption#quotex#бинарныеопционы#бинарныеопционы

SS7 TRADER

@ss7trader · Post #30610 · 24.04.2026 г., 12:05

⚙100% NON-REPAINT. 0% GUESSING.⚙ 👉Look at these clean entries from today's session with Pro Thunder V12. Once the signal appears, it STAYS. No shifting, no disappearing, just pure accuracy. 👉Neural Network Logic: Our AI scans thousands of data points to find the highest probability reversal. 📈Result: See the screenshots for the clinical precision. Stop losing money on lagging indicators. It’s time to upgrade to the V12 standard.👑 👇 GET YOUR COPY NOW 👇 👉CLICK TO GET V12 NOW! #MT5#Indicator#binaryindicator#pocketoption#quotex#бинарныеопционы#бинарныеопционы

SS7 TRADER

@ss7trader · Post #30604 · 24.04.2026 г., 11:26

⚡️V12 STRIKES AGAIN! ⚡️ Another Perfect Signal on GBPCHF. 👉 Neural Confirmed 👉 100% Non-Repaint 👉 Pure Profit Stop losing to lagging indicators. Join the ss7trader revolution today. 👑 👇GET ACCESS 👇 https://ss7trader.com/product/pro-thunder-v12/ #MT5#Indicator#binaryindicator#pocketoption#quotex#бинарныеопционы#бинарныеопционы

SS7 TRADER

@ss7trader · Post #30594 · 23.04.2026 г., 17:48

🤍Pro Thunder V12 Always working Accurately till Then Market closing with Precision! Even Market is Volatile or Not, Its Make Dominance Always!🧿 #MT5#Indicator#binaryindicator#pocketoption#quotex#бинарныеопционы#бинарныеопционы

SS7 TRADER

@ss7trader · Post #30575 · 22.04.2026 г., 21:53

⚙100% NON-REPAINT. 0% GUESSING.⚙ 👉Look at these clean entries from today's session with Pro Thunder V12. Once the signal appears, it STAYS. No shifting, no disappearing, just pure accuracy. 👉Neural Network Logic: Our AI scans thousands of data points to find the highest probability reversal. 📈Result: See the screenshots for the clinical precision. Stop losing money on lagging indicators. It’s time to upgrade to the V12 standard.👑 👇 GET YOUR COPY NOW 👇 👉CLICK TO GET V12 NOW! #MT5#Indicator#binaryindicator#pocketoption#quotex#бинарныеопционы#бинарныеопционы

SS7 TRADER

@ss7trader · Post #30857 · 15.05.2026 г., 12:55

⚙100% NON-REPAINT. 0% GUESSING.⚙ 👉Look at these clean entries from today's session with Pro Thunder V12. Once the signal appears, it STAYS. No shifting, no disappearing, just pure accuracy. 👉Neural Network Logic: Our AI scans thousands of data points to find the highest probability reversal. 📈Result: See the screenshots for the clinical precision. Stop losing money on lagging indicators. It’s time to upgrade to the V12 standard.👑 👇 GET YOUR COPY NOW 👇 👉CLICK TO GET V12 NOW! #binarytrading#pocketoption#quotex#pocketoptionindicator#quotexindicator#indicator#tradingindicator#ss7trader#MT5#Indicators#binaryindicator#бинарныеопционы#бинарныеопционы#nonrepaintindicator#highaccuracyindicator#binarytrading#pocketoption#quotex#pocketoptionindicator#quotexindicator#indicator#tradingindicator#ss7trader

SS7 TRADER

@ss7trader · Post #30847 · 14.05.2026 г., 16:13

Next-gen Neural Network Indicator for Binary Trading. Non-repaint signals with 80%+ accuracy. 120-150+ setups daily. Works across all platforms including Pocket Option & Quotex. High-performance trading starts here. #binarytrading#pocketoption#quotex#pocketoptionindicator#quotexindicator#indicator#tradingindicator#ss7trader#MT5#Indicators#binaryindicator#бинарныеопционы#бинарныеопционы#nonrepaintindicator#highaccuracyindicator#binarytrading#pocketoption#quotex#pocketoptionindicator#quotexindicator#indicator#tradingindicator#ss7trader

12
ПретходнаСтраница 1 од 2Следна