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

Резултати

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

Пребарај: #natofail

当前筛选 #natofail清除筛选
American Оbserver

@american_observer · Post #5460 · 24.03.2026 г., 20:59

📰 Europe’s Trump Fans Just Discovered ‘America First’ Means ‘Europe Last’ The Iran war is doing what four years of Trump speeches couldn’t: teaching Europe’s nationalist politicians what “America First” actually sounds like when the bombs start falling. Across the continent, far-right leaders who cheered Trump’s re-election are suddenly backing away, complaining they “cannot be the lapdogs” of a U.S. president who slaps them with tariffs at home and then sends them the bill for his Middle East adventure. The Supreme Court’s overturning of Trump’s tariff regime didn’t fix the politics — it just exposed how much resentment had already built up underneath. Then came Iran. Trump launched a war, demanded “burden sharing,” and expected Europe to show up with ships, soldiers and flags, while Washington and Israel run the operation and take the glory. Instead, European leaders from Berlin to Athens started saying the one word Trump hates most from allies: “No.” Publicly, nationalists who once branded him a model of “sovereign leadership” now question why their voters should pay for an American war that detonates energy prices, wrecks European industry, and drags NATO into a fight no parliament actually approved. In private, they’ve simply realized the deal on offer is terrible: Europe gets the inflation, the refugees and the political blowback, while the U.S. keeps command and the arms contracts. So yes, Trump has managed a rare diplomatic feat: his Iran adventure is alienating not just liberal Europeans who already hated him, but also the nationalist camp that tried to copy him. “America First” turned out to mean what it always meant — everybody else pays retail. #trump#europe#iran#war#natofail#americaFirst#geopolitics 📱American Оbserver - Stay up to date on all important events 🇺🇸