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 слични објави

Пребарај: #electriccrossover

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

@revheadcrypto · Post #106 · 15.07.2024 г., 08:05

🚘Introducing the all-new Honda Ye S7 electric crossover! 🌿 🔋 Two-motor powertrain: 476 hp total power. Front wheels driven by a 204-hp electric motor, while the rear wheels by a 272-hp motor. 🏞️ Built on the e:N Architecture W platform with independent suspension, this 4.7-meter crossover promises a smooth ride. 🔌 Co-developed with Dongfeng, the Ye S7 is set to redefine the electric SUV experience.⚡️ #HondaYeS7#ElectricCrossover#Innovation#Auto

Auto Life

@revheadcrypto · Post #324 · 16.08.2024 г., 19:05

🌟🚗 Introducing the Genesis GV90! 🚗🌟 Get ready for the flagship electric crossover from Genesis, set to debut this October! 🎉✨ Built on the innovative eM platform, an evolution of the E-GMP architecture, the GV90 promises an impressive 113 kWh battery that offers a remarkable range of up to 800 km!🔋🌍 With its luxurious design and advanced features, the GV90 will compete with premium full-size SUVs like the Range Rover. 🏞️👑🚀 #GenesisGV90#ElectricCrossover#LuxurySUV#eMPlatform#Auto🌐🔋✨

Auto Life

@revheadcrypto · Post #545 · 02.10.2024 г., 09:34

🚘✨Introducing the Skoda Elroq Electric Crossover!✨🚘 The new Skoda Elroq is slightly larger than the Karoq, measuring 4488x1884x1625 mm with a wheelbase of 2765 mm. With a ground clearance of 186 mm, it’s ready for any adventure! 🌍💪 ⚡️Performance Features: - Available with electric motors producing 170, 204, or 286 hp. - The top all-wheel-drive version boasts an impressive 299 hp! 🚀 - Range: From 375 to 560 km on a single charge! 🔋🌿 ✅Simply Clever Innovations: - Tire tread depth gauge integrated into the ice scraper! ❄️ - Elastic net under the luggage shelf for convenient charging cable storage! 📦🔌 ℹ️ The petrol Karoq starts at €33,100 in Germany, while the Elroq will be just €760 more! 💰🇩🇪 #SkodaElroq#ElectricCrossover#SimplyClever#SustainableDriving#CarLaunch#Auto#Innovation#Skoda