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

Резултати

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

Пребарај: #regnounito

当前筛选 #regnounito清除筛选
Ultimora.net - POLITICS 24

@Ultimorapolitics24 · Post #52038 · 27.02.2026 г., 15:53

🇬🇧#RegnoUnito – I Verdi vincono le elezioni suppletive a Gorton e Denton, collegio periferico di Manchester. I laburisti dimezzano il proprio sostegno, superati da Reform UK. I Verdi hanno puntato sull’elettorato musulmano (circa il 30%), mentre il partito di Farage ha prevalso nei quartieri operai bianchi. @UltimoraPolitics24

Hashtags

White House Watch

@Whitehousewatch · Post #17434 · 05.02.2026 г., 18:08

#RegnoUnito, #Trump: “I have had very productive discussions with Prime Minister Keir Starmer about the Island of Diego Garcia. It is the site of a major U.S. Military Base, strategically situated in the middle of the Indian Ocean and, therefore, of great importance to the National Security of the United States. We have the most powerful Military in the World. Our Military Operations, over the course of the last year, were successful because of the strength of our warfighters, modern capability of our equipment and, very importantly, the strategic location of our Military Bases for staging, and other reasons. I understand that the deal Prime Minister Starmer has made, according to many, the best he could make. However, if the lease deal, sometime in the future, ever falls apart, or anyone threatens or endangers U.S. operations and forces at our Base, I retain the right to Militarily secure and reinforce the American presence in Diego Garcia. Let it be known that I will never allow our presence on a Base as important as this to ever be undermined or threatened by fake claims or environmental nonsense. Thank you for your attention to this matter! PRESIDENT DONALD J. TRUMP”

Libertà è ragione

@libertaeragione · Post #4211 · 04.07.2024 г., 12:17

#Elezioni#RegnoUnito Oggi si vota nel Regno Unito! Abbiamo creato delle schede in cui potete vedere i partiti principali e dove si posizionano ideologicamente. 🔽 https://tinyurl.com/yxezy7kf @OsservatorioEsteri

123•••10•••20•••2425
ПретходнаСтраница 1 од 25Следна