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

Пребарај: #russiancourses

当前筛选 #russiancourses清除筛选
Russian Consulate in Cape Town

@rusconct · Post #2836 · 16.07.2025 г., 12:28

Free Russian Language Courses in Cape Town! We are pleased to invite everyone to take part in free Russian language courses supported by the Ministry of Education of the Russian Federation and St. Petersburg State University. 👩‍🏫 The lessons will be conducted by Dasha and Taisiya — experienced teachers of Russian as a foreign language with nearly 20 years of teaching experience. 📚 The courses are open to everyone. No prior knowledge of Russian is required. Why learn Russian? 🗣 It is a language spoken across 15 countries and serves as a bridge among more than 160 ethnic groups. 🌍 Studying Russian offers access to a rich cultural, literary, and scientific heritage — from Tolstoy and Dostoevsky to Gagarin and Tchaikovsky. 📖 Course highlights: – Basics of grammar and practical conversation – Introduction to Russian culture and traditions 🔗 Register here: https://forms.gle/p4fo6ttm8esXqtLa6 Let’s explore the Russian language together! #RussiaSouthAfrica#RussianCourses#LearnRussian

Russian House Brussels-Europe

@rushousebrussels · Post #2471 · 23.06.2025 г., 07:33

📚Enrollment is open for the 2025–26 academic year! ⏰24 June | 18:00 Join our Presentation of Russian Language Courses for Adults — meet the teachers and find the perfect program for you: ✨Fundamental Course — from A1 to C1, steady pace (October–June) ⚡️Intensive Course — fast-track A1 to A2, with speaking from day one 🌍Online — learn from anywhere in the world 🏫Offline — full language immersion 👥Group classes — motivation, support & shared experience 👤Individual lessons — flexible schedule, personalized approach 🎉 Plus, learn about our linguistic and cultural events for students! 📅Free participation — sign up via the linkhere #russianlanguage#learnrussian#russiancourses#languagelearning#onlinelearning

Russian House Brussels-Europe

@rushousebrussels · Post #2626 · 24.10.2025 г., 05:41

🏔🇷🇺✨ When your Russian truly reaches new heights! Our student took his Russian — all the way to the Himalayas! 🏔 Russian at 5300 m! Language is more than words. It’s a journey, an inspiration, and the strength that lifts you higher. Our student is traveling in the Himalayas and… he used Russian at the top of a mountain! 😄 “I told them I study Russian at the Russian Language School in Brussels. And that I have very good teachers!” Even at the highest heights, you can talk about poetry, music and your favorite language. 😉 Did you know? Russian is one of the six official international languages and is spoken by an estimated up to 285 million people worldwide. 📍Where have you used your Russian abroad? Share your story in the comments — the most inspiring ones will be featured! Join us to learn Russian! We offer in-person classes, online courses, and individual lessons. #RussianHouseBrussels#LearnRussian#RussianLanguage#CulturalDiplomacy#RussianAbroad#DiscoverRussia#RussianCourses