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

Резултати

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

Пребарај: #vocabulary

当前筛选 #vocabulary清除筛选
English From Zero to Hero

@Learn_English_from_Zero_to_Hero · Post #60783 · 16.05.2026 г., 14:43

#Vocabulary 🕸Dormant 🦦 (of an animal) having normal physical functions suspended or slowed down for a period of time; in or as if in a deep sleep 🫧 Ex:- During the winter months, the bears will often go dormant and hibernate. 🌨Basic Synonyms 🌓 asleep 🌓 slumbering 🌓 inactive 🌟Advanced Synonyms ✨ comatose ✨ supine ✨ lethargic ✨ torpid ✨ aestivating 🌔Antonyms 🍀 awake 🍀 wakeful

Hashtags

English From Zero to Hero

@Learn_English_from_Zero_to_Hero · Post #60772 · 10.05.2026 г., 14:57

#Vocabulary 🎶Repertory2⃣ 🎼a collection, especially of music or information 🎻 Ex:- This year, the Boston Philharmonic has expanded its repertory to include compositions from Mexico. 🎸Basic Synonyms 🪉 collection

Hashtags

English From Zero to Hero

@Learn_English_from_Zero_to_Hero · Post #60771 · 10.05.2026 г., 14:57

#Vocabulary 🎨Repertory1⃣ 🎭 the performance of various plays, operas, or ballets by a company at regular short intervals 🫟 Ex:- Martin was overjoyed when he learned his audition was good enough to get him accepted at the New York Repertory for Young Composers. ❄️Basic Synonyms 🫧 theater 🫧 troupe 🫧 school

Hashtags

English From Zero to Hero

@Learn_English_from_Zero_to_Hero · Post #60762 · 06.05.2026 г., 20:12

#Vocabulary 📜 Screed 📝a long speech or piece of writing, typically one regarded as tedious ✍Example:- When they lost the match, the team coach launched into an almost incoherent screed on all the areas the team had to improve in. 📒Basic Synonyms 🖌 rant 📔Advanced Synonyms 🖍 harangue

Hashtags

English From Zero to Hero

@Learn_English_from_Zero_to_Hero · Post #60761 · 06.05.2026 г., 20:12

#Vocabulary 🥢Palatable 🍽(of food or drink) pleasant to taste; has acceptable taste 🍴Example:- Tonight, a surprisingly palatable spread will be laid out on the table. Don't be shy — come. 🧉Basic Synonyms 🥤 tasty 🥤 eatable 🍹Advanced Synonyms 🧋 appetizing 🧋 edible 🧋 savoury 🧋 delectable 🧋 luscious 🧋 flavourful 🧃Antonyms 🫗 distasteful 🫗 unsavoury

Hashtags

English From Zero to Hero

@Learn_English_from_Zero_to_Hero · Post #60672 · 26.03.2026 г., 20:48

#Vocabulary ❄️Turnover 🕸The amount of money taken in by a business in a particular period 🫧 Ex:- The company's annual turnover exceeded expectations.

Hashtags

English From Zero to Hero

@Learn_English_from_Zero_to_Hero · Post #60617 · 04.02.2026 г., 18:45

#Vocabulary 🌺Diffident. ●Lacking or marked by a lack of self-confidence; shy and timid, distrustful of one's own powers. ●He was diffident about his own success. ●Because she was only a first-year student, she was diffident when offering a comment on the professor's lecture.

Hashtags

English From Zero to Hero

@Learn_English_from_Zero_to_Hero · Post #60616 · 04.02.2026 г., 18:43

#Vocabulary 🌺Spurious /ˈspjʊəriəs/ 《adjective》 ●a spurious statement, argument etc is not based on facts or good thinking and is likely to be incorrect. ▪️He demolished the opposition’s spurious arguments.

Hashtags

123•••10•••20•••30•••3233
ПретходнаСтраница 1 од 33Следна