@mashinalar · Post #1267 · 04.06.2023 г., 08:04
🔥🔥Porsche 992 Turbo S Techart #911 #992 #Porsche #TurboS#Techart @mashinalar
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
Пребарај: #techart
@mashinalar · Post #1267 · 04.06.2023 г., 08:04
🔥🔥Porsche 992 Turbo S Techart #911 #992 #Porsche #TurboS#Techart @mashinalar
@revheadcrypto · Post #526 · 25.09.2024 г., 11:41
🚗✨Introducing the Techart Monochrome: A 800-HP Tribute to the Porsche 911!🎉 🔧Engine: 3.8L Turbo Flat-Six from the 911 Turbo S, tuned to an astonishing 800 HP and 950 Nm of torque! ⚡️0-100 km/h: Just 2.5 seconds! 🏁Top Speed: A thrilling 350 km/h! 🌬️ The aerodynamic kit generates 4x more downforce than the standard 911, reducing lift by 45% at 140 km/h! 🏆 Only 20 units of this exclusive coupe will be produced! #Techart#Porsche911#Monochrome#Supercar#800HP#CarEnthusiast#LimitedEdition#Auto
@revheadcrypto · Post #391 · 26.08.2024 г., 20:00
🚗✨ Introducing the New Techart Aero Kit I for the Updated Porsche Cayenne! ✨🚗 Get ready to elevate your ride with this stunning aerodynamic body kit that not only enhances the aggressive look of the Cayenne but also improves its aerodynamics! 💨🔥 While the price of the kit is yet to be announced, Techart is already working on even more aggressive versions to take your driving experience to the next level! 🚀💪 #Techart#PorscheCayenne#AeroKitI#CarEnthusiast#LuxuryCars#Aerodynamics#UpgradeYourRide#Auto
@ThemesM8 · Post #316 · 10.07.2024 г., 23:48
https://t.me/addtheme/CyberGlow_ThemesM8 And finally, after a long time, I made a new theme again. I put a lot of time into this one to ensure that all the colors are correct. I even adjusted the story colors, channel statistics' colors, and more. By the way, as always, it also supports Desktop. Let's begin with a good theme. Enjoy! #Android#Desktop#AndroidTheme#DesktopTheme#Dark#CyberpunkTheme#NeonTheme#TechTheme#DarkTheme#GlowingTheme#DigitalArt#CyberArt#TechArt#TelegramTheme#TelegramThemes#CustomThemes#ThemeDesign#purple#ThemeCreator#DarkMode#TechAesthetics#CyberAesthetics#HackerStyle#FuturisticStyle#NeonLights#GlowInTheDark#DigitalAesthetics#CyberFashion#TechWear#NeonWear#HoodieStyle#LEDLights#TechAccessories#ThemeSupport#DesktopThemes#MobileThemes#CyberpunkArt#NeonVibes#GlowingEyes#FuturisticFashion#CyberGirl#LEDMask#HoodieFashion#NeonPink#NeonPurple#DarkAesthetic#CyberMask#FuturisticLook#TechnoFashion#NeonGlow#GlowingMask#SciFiArt#TechnoAesthetic#CyberBeauty#NightMode#CyberMood#DigitalFashion#CyberTech#NeonAesthetic#LEDGlow#ElectricVibes#TechWearFashion#FuturisticHoodie#NeonDrip#TechBeauty#LEDStyle#DarkFashion#CyberFashionista#GlowingTech#FutureFashion#CyberVibes#NeonDreams#HackerFashion#TechnoChic#NeonLightsFashion 🩷@ThemesM8 🩷 ⭐️ BOOST ⭐️
Hashtags