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

Резултати

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

Пребарај: #sys

当前筛选 #sys清除筛选
Pro Analysis

@proanalysistrader · Post #28564 · 20.03.2025 г., 14:07

#SYS/USDT analysis : The #SYS is currently in a downtrend, trading below the 200EMA. The price is testing resistance at the current level, and it's expected to decline further from there, potentially testing lower price levels. TF : 2h Entry : $0.0487 Target : $0.0410 SL : $0.0522

Hashtags

Pro Analysis

@proanalysistrader · Post #28452 · 05.02.2025 г., 15:07

#SYS/USDT analysis : #SYS is currently in a correction phase, experiencing a retracement toward the 200 EMA. This presents a potential long trade opportunity on lower time frame. Look for price to retrace and test the support zone for a long entry. TF : 30min Entry : $0.0676 Target : $0.0735 SL : $0.0644

Hashtags

Pro Analysis

@proanalysistrader · Post #28091 · 30.10.2024 г., 05:25

#SYS/USDT analysis : #SYS is currently consolidating sideways within the support zone and is expected to rebound from this level, potentially testing previous highs. It is advisable to wait for a pullback to establish a long position. TF : 1D Entry : $0.0964 Target : $0.1257 SL : $0.0822

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #9176 · 16.01.2026 г., 17:01

#SYS👈 https://www.binance.com/en/trade/SYS_BTC Buying rate 21-23 👀sitting near bottom Sell 🤑 29 🤑 32 🤑 35 🚀 40 & above Bullish above 20 🔼 Death Zone below 19 🔽

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #9151 · 08.07.2025 г., 17:45

#SYS👈 https://www.binance.com/en/trade/SYS_BTC Buying rate 31-33 👀sitting near bottom Sell 🤑 36 🤑 36-39 🤑 39-42 🚀 42-50 & above Bullish above 29 🔼 Death Zone below 29🔽 Powered by @cryptoProfitCoach

Hashtags

Fed. Russian Insiders ®

@FedRussianInsidersVip4Free · Post #6763 · 25.10.2025 г., 14:14

BUYING $SYS HERE Exchange: Binance / Binance Futures Leverage: 3-5x Breakout confirmed. Market conditions are perfect for an easy 100-200% move on #SYS Targets: OPEN SL: Below 0.0254

Hashtags

Fed. Russian Insiders ®

@FedRussianInsidersVip4Free · Post #6715 · 13.10.2025 г., 12:01

LONGING $SYS HERE Exchange: Binance / Binance Futures Leverage: 5x Breakout confirmed after bottoming out. #SYS is ready to reach new highs, easy 3-5x move🐋 Targets: 0.048 - 0.052 - 0.060 - 0.074 - 0.092 - 0.110 - 0.132 - 0.151 - OPEN SL: Below 0.031

Hashtags

Binance Big Pump Signals Future trade

@binancebigpumpsignalsfuture · Post #2080 · 26.02.2022 г., 19:17

#SYS result 2 nd target achieved in just 11 hours ✅✅ One more huge quick profit 17% +🤑💰🤑 👉 Still thinking? The more you wait more you lose profit ☎️ Contact @MichaelStrategiesVip for membership and grab next breakout signal

Hashtags

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