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

TGINSIGHT SIMILAR POSTS

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

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

Ранее я делал серию постов про битовые операторы. Вот вам ещё один наглядный пример как это используется в Python в модуле re. Чтобы указать флаг для компилятора нам надо указать его после передаваемой строки. Например, добавляем флаг для игнорирования переноса строки. pattern = re.compile(r"(\w+)+") words = pattern.search(text, re.DOTALL) А как указать несколько флагов? Ведь явно будут ситуации когда нам потребуется больше одного. Кто читал посты по битовые операторы уже понял как. pattern.search(text, re.DOTALL | re.VERBOSE) А теперь смотрим исходники, что находится в этих атрибутах? Не удивительно, степени двойки. Почему? Потому что каждое следующее значение это сдвиг единицы влево. >>> for n in [1, 2, 4, 8, 16, 32, 64, 128, 256]: >>> print(bin(n)) 0b1 0b10 0b100 0b1000 0b10000 0b100000 0b1000000 0b10000000 0b100000000 Чтобы было понятней, давайте напишем тоже самое но иначе, добавим ведущие нули: 000000001 000000010 000000100 000001000 000010000 000100000 001000000 010000000 100000000 Не понятно что тут происходит? Читай три поста про битовые операторы начиная с этого ➡️https://t.me/pythonotes/45 В общем, это пример применения побитовых операций в самом Python. Теперь вы знаете Python еще немного лучше) #tricks#regex#libs

Резултати

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

Пребарај: #manualtransmission

当前筛选 #manualtransmission清除筛选
Auto Life

@revheadcrypto · Post #222 · 02.08.2024 г., 12:26

🚗✨Exciting News for Honda Fans!✨🚗 The Honda Civic has just unveiled its new RS version with a manual transmission! 🎉 This sporty hatchback is designed for the Japanese market and fills the gap between the standard Civic and the high-performance Type R. Key Features of the RS: 🔧 Enhanced suspension with new dampers for a firmer ride 🛠️ Improved steering for better handling 🛑 Upgraded brakes for superior stopping power 💪 Powered by a 1.5-liter engine producing 183 HP and 240 Nm of torque! 🏁💨 #HondaCivic#CivicRS#ManualTransmission#CarEnthusiast#Hatchback#Auto

Auto Life

@revheadcrypto · Post #267 · 08.08.2024 г., 07:34

🚗✨Supercar Pagani Zonda Gets a Manual Transmission!🔧 In a stunning transformation, this iconic roadster has been upgraded with a manual gearbox at the request of renowned collector Mike Iney. 🏎️💨 Powered by a monstrous 760-hp Mercedes-AMG V12 engine with a 7.3-liter displacement, this beauty is ready to deliver an unforgettable driving experience!🔥 #PaganiZonda#ManualTransmission#Supercar#CarEnthusiast#MikeIney#AMGV12#Auto

Auto Life

@revheadcrypto · Post #479 · 12.09.2024 г., 09:22

🚀Introducing the World's Most Powerful Supercar with a Manual Transmission!🏎️💨 The renowned atelier Hennessey has unveiled the new Venom F5-M roadster! 🌟 This stunning version retains the same 1842-hp V8 engine, but swaps the seven-speed automatic for a thrilling six-speed manual gearbox! 🕹️✨ The Hennessey Venom F5-M is set to be the most powerful production supercar with three pedals, starting at an incredible $2.65 million! 💰🔥 Only 12 units of the Venom F5-M will be produced, part of the exclusive batch promised in 2022. The total production of this roadster will not exceed 30 cars! 🛠️🏁 Get ready for an unparalleled driving experience! #Hennessey#VenomF5M#Supercar#ManualTransmission#PowerfulPerformance#CarEnthusiasts#LuxuryCars#LimitedEdition#Auto🚗💥