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

Резултати

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

Пребарај: #ldo

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

@CoinSonar · Post #244133 · 18.04.2026 г., 10:54

#LDO | Volume spike (USDT PAIR) 10 times the average volume 143.62K USDT traded in 15 min └Selling vol: 85.74K USDT 🔴 Boost score: 1/10 24h Vol: 1.36M USDT (Binance) Price: 0.4096 (-3.0% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243785 · 17.04.2026 г., 17:16

#LDO | Volume spike (USDT PAIR) 16 times the average volume 232.27K USDT traded in 15 min └Selling vol: 146.14K USDT 🔴 Boost score: 1/10 24h Vol: 1.36M USDT (Binance) Price: 0.4273 (-3.0% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243735 · 17.04.2026 г., 15:16

#LDO | Volume spike (USDT PAIR) 10 times the average volume 152.74K USDT traded in 15 min └Buying vol: 82.81K USDT 🟢 Boost score: 3/10 24h Vol: 1.36M USDT (Binance) Price: 0.4284 (-3.0% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243663 · 17.04.2026 г., 13:16

#LDO | Volume spike (USDT PAIR) 10 times the average volume 143.55K USDT traded in 15 min └Buying vol: 73.90K USDT 🟢 Boost score: 5/10 24h Vol: 1.36M USDT (Binance) Price: 0.4270 (-3.0% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243571 · 17.04.2026 г., 09:27

#LDO | Volume spike (USDT PAIR) 10 times the average volume 143.04K USDT traded in 15 min └Buying vol: 95.07K USDT 🟢 Boost score: 6/10 24h Vol: 1.36M USDT (Binance) Price: 0.4304 (-3.0% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243449 · 17.04.2026 г., 05:01

#LDO | Volume spike (USDT PAIR) 10 times the average volume 153.34K USDT traded in 15 min └Buying vol: 99.59K USDT 🟢 Boost score: 3/10 24h Vol: 1.36M USDT (Binance) Price: 0.4222 (-3.0% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243379 · 17.04.2026 г., 00:45

#LDO | Volume spike (USDT PAIR) 9 times the average volume 139.50K USDT traded in 15 min └Buying vol: 76.76K USDT 🟢 Boost score: 4/10 24h Vol: 1.36M USDT (Binance) Price: 0.4418 (-3.0% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243343 · 16.04.2026 г., 22:25

#LDO | Volume spike (USDT PAIR) 12 times the average volume 175.80K USDT traded in 15 min └Buying vol: 118.48K USDT 🟢 Boost score: 5/10 24h Vol: 1.36M USDT (Binance) Price: 0.4352 (-3.0% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243309 · 16.04.2026 г., 20:13

#LDO | Volume spike (USDT PAIR) 18 times the average volume 264.87K USDT traded in 15 min └Selling vol: 136.71K USDT 🔴 Boost score: 1/10 24h Vol: 1.36M USDT (Binance) Price: 0.4484 (-3.0% in 24h)

Hashtags

CryptoBull_360™

@cryptobull_360 · Post #48917 · 25.03.2026 г., 04:56

🤔#LDO Financial indicators for Lido in 2025 show that total revenue decreased by 23% on an annual basis to $40.5 million, with net staking commission revenue amounting to $37.4 million. The DAO is evaluating a potential LDO buyback program in the second quarter of 2026. link

Hashtags

Pro Analysis

@proanalysistrader · Post #27806 · 06.08.2024 г., 11:11

#LDO/USDT analysis : #LDO is in a downtrend, currently rejecting from the 200 EMA resistance after going through a correction phase. It is expected to continue its bearish momentum and test the previous swing low. Wait for the break of the $1.091 level downside for a short entry. TF : 15min Entry : $1.091 Target : $0.993 SL : $1.153

Hashtags

Pro Analysis

@proanalysistrader · Post #27781 · 01.08.2024 г., 15:43

#LDO/USDT analysis - #LDO has recently broken out of the channel after facing rejection from the 200 EMA in a downtrend. It is now expected to continue its downward momentum and test new lows. TF : 2H Entry : $1.530 Target : $1.398 SL : $1.604

Hashtags

123•••78
ПретходнаСтраница 1 од 8Следна