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

Резултати

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

Пребарај: #band

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

@CoinSonar · Post #243780 · 17.04.2026 г., 17:07

#BAND | Volume spike (USDT PAIR) 318 times the average volume 110.09K USDT traded in 5 min └Selling vol: 72.65K USDT 🔴 Boost score: 1/10 24h Vol: 99.59K USDT (Binance) Price: 0.238 (-2.3% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243715 · 17.04.2026 г., 14:41

#BAND | Volume spike (USDT PAIR) 128 times the average volume 133.15K USDT traded in 15 min └Selling vol: 67.98K USDT 🔴 Boost score: 1/10 24h Vol: 99.59K USDT (Binance) Price: 0.245 (-2.3% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243615 · 17.04.2026 г., 11:26

#BAND | Volume spike (USDT PAIR) 128 times the average volume 132.92K USDT traded in 15 min └Buying vol: 80.65K USDT 🟢 Boost score: 3/10 24h Vol: 99.59K USDT (Binance) Price: 0.257 (-2.3% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243515 · 17.04.2026 г., 07:47

#BAND | Volume spike (USDT PAIR) 124 times the average volume 129.15K USDT traded in 15 min └Buying vol: 109.53K USDT 🟢 Boost score: 6/10 24h Vol: 99.59K USDT (Binance) Price: 0.246 (-2.3% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28431 · 28.01.2025 г., 14:17

#BAND/USDT analysis : #BAND is in a downtrend. The price has broken down and retested the previous support levels. It is expected to resume its bearish direction from the current level and test lower levels. TF : 2H Entry : $1.168 Target : $1.068 SL : $1.238

Hashtags

Pro Analysis

@proanalysistrader · Post #28341 · 15.12.2024 г., 03:45

#BAND/USDT analysis : #BAND has successfully tested the 200 EMA and has bounced back. Currently, the price is retracing toward a key support zone. It is recommended to wait for the price to retest this support zone before considering a long entry. There is a strong expectation that the price will rally and aim to test previous highs. TF : 4H Entry : $1.756 Target : $2.326 SL : $1.470

Hashtags

Pro Analysis

@proanalysistrader · Post #28293 · 01.12.2024 г., 09:17

#BAND/USDT analysis : #BAND is in an uptrend, trading above the 200 EMA. The price has recently bounced back from the 200 EMA and a support zone, indicating a continuation of bullish momentum. It is expected that the price will test the previous swing high. TF : 15min Entry : $1.833 Target : $1.990 SL : $1.786

Hashtags

Pro Analysis

@proanalysistrader · Post #27782 · 02.08.2024 г., 05:32

#BAND/USDT analysis - #BAND is in a downtrend, trading below the 200 EMA. The price has retraced to the previous support, which is now acting as resistance, and is being rejected from there to continue its downward momentum. TF : 15min Entry : $1.332 Target : $1.252 SL : $1.380

Hashtags

BULLSTAR - SIGNALS

@bullstar1 · Post #4445 · 22.08.2025 г., 14:55

COIN: $BAND/USDT (5-10x) Direction: LONG 📈 #BAND/USDT Take-Profit Target 5🎯 Profit : 44.12% with 10x Leverage (PREMIUM SIGNAL) Everyone else is just trying to survive… while our VIPs keep hitting big wins! 🔥👇 t.me/BULLSTAR_ADMIN

Hashtags

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