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

Резултати

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

Пребарај: #axs

当前筛选 #axs清除筛选
Coin Sonar

@CoinSonar · Post #244244 · 18.04.2026 г., 15:22

#AXS | Volume spike (USDT PAIR) 12 times the average volume 166.56K USDT traded in 15 min └Buying vol: 123.61K USDT 🟢 Boost score: 3/10 24h Vol: 1.28M USDT (Binance) Price: 1.154 (-2.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #244048 · 18.04.2026 г., 07:50

#AXS | Volume spike (USDT PAIR) 182 times the average volume 162.93K USDT traded in 1 min └Selling vol: 126.26K USDT 🔴 Boost score: 1/10 24h Vol: 1.28M USDT (Binance) Price: 1.217 (-2.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243675 · 17.04.2026 г., 13:27

#AXS | Volume spike (USDT PAIR) 9 times the average volume 130.07K USDT traded in 15 min └Buying vol: 71.08K USDT 🟢 Boost score: 5/10 24h Vol: 1.28M USDT (Binance) Price: 1.207 (-2.2% in 24h)

Hashtags

🚀🚀 Another massive profit made in Premium Group and this time it is#AXS/USDT which crossed All the Profit Targets for an humongous gain of 99% 🗨Contact @futurechief to enter the Binance Futures/Bybit/Kucoin/OKX Premium Signal Group & Receive daily high quality signals by being in the Premium Group

Hashtags

Pro Analysis

@proanalysistrader · Post #28467 · 12.02.2025 г., 17:04

#AXS/USDT analysis : #AXS is retracing towards the 200 EMA and is expected to retest this level before continuing its bearish momentum. The current level presents a favorable opportunity for a long entry, with the swing high resistance level identified as the target. TF : 4H Entry : $4.444 Target : $4.990 SL : $4.160

Hashtags

American Crypto©

@americancryptotrading · Post #27228 · 24.04.2025 г., 10:51

🇺🇸#AXS/USDT is currently heading towards the descendingresistance line on the daily timeframe💁‍♂️ A strong upward impulse is likely🐃 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27039 · 04.11.2024 г., 18:14

🇺🇸#AXS/USDT is forming the descendingtriangle on weekly timeframe🧐 Bullish case🚀 American Crypto©

Hashtags

Free Crypto Signals (Profitable Zone)

@btctradingclub · Post #26804 · 19.01.2026 г., 22:11

🚀🚀 315% Profit on #AXS/USDT for our Premium Members on Binance Futures/Bybit/OKXX/Kucoin/Bitget ✅✅ All target completed 👁‍🗨Contact @primemod to enter the Premium Group for high quality SPOT & FUTURES Signals

Hashtags

123•••56
ПретходнаСтраница 1 од 6Следна