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

Резултати

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

Пребарај: #pyr

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

@CoinSonar · Post #244030 · 18.04.2026 г., 07:18

#PYR | Volume spike (USDT PAIR) 19 times the average volume 128.31K USDT traded in 15 min └Buying vol: 80.26K USDT 🟢 Boost score: 4/10 24h Vol: 627.61K USDT (Binance) Price: 0.313 (-2.1% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243888 · 18.04.2026 г., 00:11

#PYR | Volume spike (USDT PAIR) 52 times the average volume 114.16K USDT traded in 5 min └Buying vol: 85.44K USDT 🟢 Boost score: 7/10 24h Vol: 627.61K USDT (Binance) Price: 0.316 (-2.1% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243853 · 17.04.2026 г., 22:10

#PYR | Volume spike (USDT PAIR) 50 times the average volume 110.23K USDT traded in 5 min └Buying vol: 61.91K USDT 🟢 Boost score: 4/10 24h Vol: 627.61K USDT (Binance) Price: 0.303 (-2.1% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243814 · 17.04.2026 г., 18:56

#PYR | Volume spike (USDT PAIR) 49 times the average volume 107.53K USDT traded in 5 min └Buying vol: 88.98K USDT 🟢 Boost score: 7/10 24h Vol: 627.61K USDT (Binance) Price: 0.291 (-2.1% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28318 · 06.12.2024 г., 08:09

#PYR/USDT analysis : #PYR is currently in an uptrend, forming a higher highs (HHs) and higher lows (HLs) structure. At present, the price is undergoing a correction phase, with expectations of a breakout from the trendline soon, which will allow it to resume its bullish momentum. Wait for a break above the $4.320 level as a signal to enter long positions. TF : 1h Entry : $4.320 Target : $4.845 SL : $3.969

Hashtags

Pro Analysis

@proanalysistrader · Post #27909 · 07.09.2024 г., 06:09

#PYR/USDT analysis : #PYR is in a downtrend, forming lower lows (LLs) and lower highs (LHs) structure. The price is currently trading below the 200 Exponential Moving Average (EMA). It is anticipated that the price will retrace back to the resistance zone and then reverse from there to continue its bearish momentum and test the previous swing low. TF : 30min Entry : $2.438 Target : $2.299 SL : $2.495

Hashtags

American Crypto©

@americancryptotrading · Post #27224 · 20.04.2025 г., 14:23

🇺🇸#PYR/USDT is poised to breakout from the descendingresistance line on the daily chart💁‍♂️ Pump is expected🚀 American Crypto©

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #8307 · 03.10.2022 г., 14:46

#PYR https://www.binance.com/en/trade/PYR_BTC Buying Zone 1850-1868 We are expecting ride in this Coin 🚀🚀🚀🚀 Buy in parts and Strictly follow as directed 👆 Sell 🤑 2000-2050 🤑 2050- 2250 🤑 2250- 2400 🚀 2400- 2600 & above Exit/Re-Entry point- 1800

Hashtags

Binance Big Pump Signals Future trade

@binancebigpumpsignalsfuture · Post #1972 · 13.01.2022 г., 13:26

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

Hashtags

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