@MLB_Daily · Post #16243 · 22.11.2025 г., 16:35
🤠🤠 Los Rangers no ofrecieron contrato a Jonah Heim, convirtiéndolo en agente libre. #️⃣#Rangers#Heim 🗞 | t.me/MLB_Daily
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
Пребарај: #rangers
@MLB_Daily · Post #16243 · 22.11.2025 г., 16:35
🤠🤠 Los Rangers no ofrecieron contrato a Jonah Heim, convirtiéndolo en agente libre. #️⃣#Rangers#Heim 🗞 | t.me/MLB_Daily
@MLB_Daily · Post #16242 · 22.11.2025 г., 16:29
🤠 Adolis García está a punto de convertirse en agente libre, según múltiples informes. 👀 ¿Dónde firmará? #️⃣#JAGarcía#Rangers 🗞 | t.me/MLB_Daily
@MLB_Daily · Post #16145 · 09.11.2025 г., 00:11
🧤🤠 ¡Los Texas Rangers se llevan el Guante de Oro del equipo de la Liga Americana! #️⃣#GoldGlove25#Rangers 🗞 | t.me/MLB_Daily
Hashtags
@MLB_Daily · Post #16978 · 24.03.2026 г., 00:22
🤠 Chris Young les dijo a los reporteros que Andrew McCutchen estará en la lista del Día de Apertura de los Rangers. #️⃣#Rangers#McCutchen 🗞 | t.me/MLB_Daily
Hashtags
@MLB_Daily · Post #16754 · 12.02.2026 г., 23:43
🏥🤠 El prospecto #1 de los Rangers y #7 de la MLB, Sebastian Walcott, tiene una rotura del LCA que podría causar que sea apartado del juego durante toda la temporada. #️⃣#Rangers#Walcott 🗞 | t.me/MLB_Daily
@MLB_Daily · Post #16735 · 11.02.2026 г., 23:20
🤠🐍 Según se informa, Jordan Montgomery y los Rangers están de acuerdo en un contrato. #️⃣#Rangers#JMontgomery 🗞 | t.me/MLB_Daily
Hashtags
@MLB_Daily · Post #16709 · 06.02.2026 г., 23:31
🤠🤝 Los Rangers y el lanzador derecho Ryan Brasier acordaron un contrato, según múltiples informes, incluido el del insider de MLB Network, Jon Heyman. #️⃣#Rangers#Brasier 🗞 | t.me/MLB_Daily
@MLB_Daily · Post #16371 · 17.12.2025 г., 12:55
🤠🤝 Los Rangers y el lanzador derecho Chris Martin supuestamente acordaron un contrato de un año, según múltiples informes, incluido el de Mark Feinsand de MLB. #️⃣#Rangers#Martin 🗞 | t.me/MLB_Daily
@MLB_Daily · Post #16355 · 13.12.2025 г., 14:04
🤠🤝 Los Rangers y el receptor Danny Jansen acuerdan un contrato de 2 años, según múltiples informes, incluido el del insider de MLB Network, Jon Heyman. #️⃣#Rangers#DJansen 🗞 | t.me/MLB_Daily
@MLB_Daily · Post #16238 · 21.11.2025 г., 14:17
🤠🤠 Con los Rangers supuestamente buscando deshacerse de su contrato y Seager teniendo solo una cláusula parcial de no intercambio que deja disponibles 8 equipos para que pueda ser traspasado sin poder de veto, ¿qué equipo necesita hacer un trato por el campocorto estrella? #️⃣#Rangers#Seager 🗞 | t.me/MLB_Daily
@ai_match_prediction · Post #12013 · 10.05.2026 г., 05:06
Scotland Premiership🏴 2026-05-10 11:00 UTC Celtic vs. Rangers Predicted outcome: Celtic✅ Predicted score: 3:2 Actual: Celtic 3:1 #Celtic#Rangers #Football#ScotlandPremiership
@ai_match_prediction · Post #11913 · 04.05.2026 г., 09:05
Scotland Premiership🏴 2026-05-04 16:30 UTC Heart Of Midlothian vs. Rangers Predicted outcome: Heart Of Midlothian✅ Predicted score: 2:1 Actual: Heart Of Midlothian 2:1 #HeartOfMidlothian#Rangers #Football#ScotlandPremiership