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 слични објави

Пребарај: #gmt

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

@proanalysistrader · Post #28374 · 07.01.2025 г., 15:36

#GMT/USDT analysis : Following the breakout and subsequent retest of the 200 EMA, the price is now declining. It is anticipated that this downward momentum will persist, leading to a test of lower levels. TF : 4H Entry : $0.1586 Target : $0.1414 SL : $0.1670

Hashtags

Pro Analysis

@proanalysistrader · Post #27827 · 10.08.2024 г., 18:27

#GMT/USDT analysis : #GMT is in an uptrend on LTF. The price has broken and retested the 200 EMA. Currently, the price is bouncing back from the 200 EMA and is expected to continue its bullish momentum. TF : 30min Entry : $0.1132 Target : $0.1199 SL : $0.1089

Hashtags

American Crypto©

@americancryptotrading · Post #27582 · 08.04.2026 г., 10:26

🇺🇸#GMT/USDT is testing the lowerboundary of the descendingchannel pattern on the weekly timeframe💁‍♂️ Bullish if we bounce off the one📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27116 · 10.01.2025 г., 14:21

🇺🇸#GMT/USDT is bouncing off the broken descendingtriangle on the weekly chart🔍 More upside if bounce occurs📈 American Crypto©

Hashtags

Crypto Angels

@cryptoangelsusa · Post #22229 · 10.01.2026 г., 01:00

🌊#GMT/USDT: #(Short) ✅Entry zone: 0.01934 ☑️Targets: 0.01905, 0.01886, 0.01866, 0.01837, 0.01818, 0.01789 🚫Stop Loss : 5-10% ⚜️Leverage: Cross (20х)

Hashtags

Binance Mafia

@binancemafia · Post #3544 · 10.03.2025 г., 10:24

#GMT overall trend is bearish, with a significant downtrend visible from the peak in late December.Price has been making lower highs and lower lows, indicating continuous selling pressure. 🔥👍✅ Further,As long as the price stays below $0.0847, the bearish trend remains strong.A potential relief bounce could occur, but confirmation is needed.Bulls need to reclaim resistance levels above $0.0847 to signal a possible trend reversal.👍🔥✅

Hashtags

Binance Mafia

@binancemafia · Post #3420 · 27.01.2025 г., 08:28

#GMT is testing the major support zone and testing the Daily range low. Market is taking a correction before going up and we can see big moves in coming months.🔥✅ Further. GMT is looking good for investment in upcoming Alt Season.🔥✅😍👀✅🔥😳

Hashtags

Binance Mafia

@binancemafia · Post #3183 · 18.11.2024 г., 08:43

#GMT will test the resistance zone and it has caused the liquidity on resistance zones .Market can see a breakout and bullish move soon,🔥✅ Further, market will take a bullish soon ahead as BTC.D will soon take a breakdown.🔥✅😍👀✅🔥😳

Hashtags

Binance crypto champions

@binancecryptochampions · Post #3006 · 09.01.2026 г., 16:31

✴️Free signal-Futures ✴️ ⚡️⚡️#GMT/USDT⚡️⚡️ Signal Type: Regular (Long) Leverage: Cross (20x) Margin: 2.0% Entry Targets: 1) 0.01700 2) 0.01900 Take-Profit Targets: 1) 0.02050 2) 0.02150 3) 0.02350 Stop Targets: 1) 0.01600 🍁 Published by: @Trading_exp🍁 Join_vip: @Crypto_Futures_Spot_Payment_bot

Hashtags

Binance crypto champions

@binancecryptochampions · Post #2398 · 12.06.2025 г., 13:20

✴️Free signal-Futures ✴️ ⚡️⚡️#GMT/USDT⚡️⚡️ Exchanges: Binance Futures, ByBit USDT, KuCoin Futures Signal Type: Regular (Long Leverage: Cross (10.0x) Entry Targets: 1) 0.0519 2) 0.0496 Take Profit Targets: 1) 0.0523 2) 0.0542 3) 0.0562 Stop Targets: 1) 0.0473 🌱 Published By: @Trading_exp🌱

Hashtags

Crypto

@signal_bitcoins · Post #2298 · 12.01.2024 г., 15:07

🔵#GMT price is rising in a Bullish channel on 6H Time frame,we expect it will have another bullish leg from the bottom of this pattern 👀 ❄️@signals_bitcoin_crypto❄️ ❄️@Shadow_support0o❄️

Hashtags

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