TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #65 · 8 апр.

Небольшой трик с регулярными выражениями который редко вижу в чужом коде. Допустим, вам нужно распарсить простой текст и вытащить оттуда пары имя+телефон. Вернуть всё это надо в виде списка словарей. Возьмем очень простой пример текста. >>> text = ''' >>> Alex:8999123456 >>> Mike:+799987654 >>> Oleg:+344456789 >>> ''' Соответственно, для выделения нужных элементов будем использовать группы. Получится такой паттерн: (\w+):([\d+]+) Как мы будем формировать словарь из найденных групп? >>> import re >>> results = [] >>> for match in re.finditer(r"(\w+):([\d+]+)", text): >>> results.append({ >>> "name": match.group(1), >>> "phone": match.group(2) >>> }) >>> print(results) [{'name': 'Alex', 'phone': '8999123456'}, ...] Можно немного сократить запись используя zip >>> results = [] >>> for match in re.finditer(r"(\w+):([\d+]+)", text): >>> results.append(dict(zip(['name', 'phone'], match.groups()))) Но есть способ лучше! Это именованные группы в regex. Можно в паттерне указать имя группы и результат сразу забрать в виде словаря. >>> for match in re.finditer(r"(?P<name>\w+):(?P<phone>[\d+]+)", text): >>> results.append(match.groupdict()) То есть всё что я сделал, это добавил в начале группы (внутри сбокочек) такую запись: (?P<group-name>...) Теперь найденная группа имеет имя и можно обратиться к ней как к элементу списка >>> name = match['name'] Либо забрать сразу весь словарь методом groupdict() >>> match.groupdict() #tricks#regex

Резултати

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

Пребарај: #gtc

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

@CoinSonar · Post #244021 · 18.04.2026 г., 07:04

#GTC | Volume spike (USDT PAIR) 130 times the average volume 142.91K USDT traded in 15 min └Selling vol: 77.96K USDT 🔴 Boost score: 1/10 24h Vol: 104.82K USDT (Binance) Price: 0.100 (+1.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243969 · 18.04.2026 г., 04:49

#GTC | Volume spike (USDT PAIR) 296 times the average volume 107.93K USDT traded in 5 min └Buying vol: 61.28K USDT 🟢 Boost score: 4/10 24h Vol: 104.82K USDT (Binance) Price: 0.101 (+1.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243612 · 17.04.2026 г., 11:25

#GTC | Volume spike (USDT PAIR) 118 times the average volume 129.07K USDT traded in 15 min └Buying vol: 74.15K USDT 🟢 Boost score: 4/10 24h Vol: 104.82K USDT (Binance) Price: 0.099 (+1.2% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28458 · 08.02.2025 г., 15:30

#GTC/USDT analysis : #GTC is currently retracing towards the 200 EMA, creating a potential long opportunity on lower time frames (LTF). The price has bounced back from the support zone and is anticipated to test higher levels. TF : 2h Entry : $0.418 Target : $0.469 SL : $0.385

Hashtags

Pro Analysis

@proanalysistrader · Post #28399 · 18.01.2025 г., 18:25

#GTC/USDT analysis : #GTC is currently in a downtrend, marked by a series of lower lows (LLs) and lower highs (LHs). The price is trading within a resistance zone, encountering significant resistance. Consequently, a continuation of the decline is anticipated from this level, with the price likely to test lower levels in the near future. TF : 4H Entry : $0.658 Target : $0.560 SL : $0.722

Hashtags

Pro Analysis

@proanalysistrader · Post #28075 · 27.10.2024 г., 12:23

#GTC/USDT analysis : #GTC has broken below support levels. The price is expected to continue falling and test lower levels, as the higher time frame (HTF) is bearish. Wait for the price to retest the zone before entering a short position. TF : 4h Entry : $0.644 Target : $0.596 SL : $0.678

Hashtags

Mexc Crypto Signals Pumps Trading Kucoin

@mexc_signals_pumps_trading · Post #1029 · 09.05.2024 г., 21:20

#GTC/USDT UPDATE: #GTC is now trading around 1.27$. #GTC has broken out a Inverse Head and shoulder pattern on hourly time frame. So the Possible scenario is According to the pattern, we can see short term bullish momentum in it and we can see the price pump 15-20%. Stay tuned with us for further updates✔️

Hashtags

Alex Kowalski | Trade

@kowalskitrade · Post #648 · 22.08.2024 г., 18:08

#GTC The coin looks very good, there is buying, there is reaction from the zones, waiting for further markup of the asset to cover the upper weekly imbalance 📈Sign up on Bybit to trade with me

Hashtags

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