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

Резултати

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

Пребарај: #flux

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

@CoinSonar · Post #244230 · 18.04.2026 г., 15:00

#FLUX | Volume spike (USDT PAIR) 510 times the average volume 98.12K USDT traded in 1 min └Buying vol: 83.86K USDT 🟢 Boost score: 8/10 24h Vol: 276.54K USDT (Binance) Price: 0.0686 (-5.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243608 · 17.04.2026 г., 11:15

#FLUX | Volume spike (USDT PAIR) 111 times the average volume 107.46K USDT traded in 5 min └Buying vol: 63.63K USDT 🟢 Boost score: 6/10 24h Vol: 276.54K USDT (Binance) Price: 0.0721 (-5.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243510 · 17.04.2026 г., 07:43

#FLUX | Volume spike (USDT PAIR) 45 times the average volume 131.75K USDT traded in 15 min └Buying vol: 75.84K USDT 🟢 Boost score: 5/10 24h Vol: 276.54K USDT (Binance) Price: 0.0667 (-5.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243415 · 17.04.2026 г., 02:04

#FLUX | Volume spike (USDT PAIR) 44 times the average volume 129.11K USDT traded in 15 min └Buying vol: 105.98K USDT 🟢 Boost score: 6/10 24h Vol: 276.54K USDT (Binance) Price: 0.0666 (-5.2% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28106 · 02.11.2024 г., 04:52

#FLUX/USDT analysis : #FLUX is currently in a downtrend, forming lower lows (LLs) and lower highs (LHs) below the 200 EMA. The price is rejecting from the resistance zone and is expected to decline further, maintaining its bearish momentum and potentially testing lower levels. Wait for pullback for short entry. TF : 4h Entry : $0.5124 Target : $0.4521 SL : $0.5531

Hashtags

Pro Analysis

@proanalysistrader · Post #27910 · 07.09.2024 г., 15:44

#FLUX/USDT analysis : #FLUX has recently rebounded from the support zone. It is anticipated to keep rising and test the resistance zone on the lower time frame (LTF). TF : 1h Entry : $0.5469 Target : $0.5847 SL : $0.5207

Hashtags

American Crypto©

@americancryptotrading · Post #27569 · 26.03.2026 г., 10:06

🇺🇸#FLUX/USDT is trading near the lowerborder of the descendingchannel on the 3D chart💁‍♂️ Time to load a bag📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27202 · 31.03.2025 г., 18:42

🇺🇸#FLUX/USDT is attempting to bounce off the lower border of the descending channel on the weekly timeframe🔍 Looking for a recovery🚀 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27171 · 01.03.2025 г., 13:21

🇺🇸#FLUX/USDT is attempting to bounce from the supportzone on the weekly timeframe👀 Recovery is on the way🚀 American Crypto©

Hashtags

Crypto Angels

@cryptoangelsusa · Post #21955 · 08.11.2025 г., 06:12

Binance Futures, Bitget Futures, ByBit USDT, KuCoin Futures, OKX Futures #FLUX/USDT All take-profit targets achieved 😎 Profit: 79.8279% 📈 Period: 1 Hours 19 Minutes ⏰

Hashtags

123•••10•••1314
ПретходнаСтраница 1 од 14Следна