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

Резултати

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

Пребарај: #oceans

当前筛选 #oceans清除筛选
Interesting Planet 🌍

@interesting_planet_facts · Post #1028 · 13.11.2025 г., 12:11

🌎 Symbiosis between clownfish and sea anemones is a classic example of cooperation in nature. Clownfish live among anemone tentacles for protection, while their movements help ventilate and clean the anemone. Clownfish secrete mucus that prevents the anemone’s stings from harming them. ✨ #biology⚡#oceans⚡#animals 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #932 · 18.10.2025 г., 22:11

🌎 Ocean-based carbon removal technologies are being piloted to fight climate change. Examples include spreading crushed minerals in seawater or using seaweed farms to absorb CO2. One experiment off Canada’s coast aims to capture and store up to 20,000 tons of CO2 per year. ✨ #climate⚡#oceans⚡#technology 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #752 · 15.09.2025 г., 00:22

🌎 Box jellyfish, found in tropical oceans, have venom so deadly it can stop a human heart within minutes. Their nearly invisible tentacles can reach up to 3 meters long and are packed with thousands of stinging cells. ✨ #animals⚡#venom⚡#oceans 👉subscribe Interesting Planet ​

Amazing Geography 🌍

@amazingeo · Post #608 · 02.02.2026 г., 12:31

🌍 Asia is the largest continent, but the Pacific Ocean is even bigger—its area almost doubles that of all land in Asia, making it Earth’s vastest single geographic feature. ✨ #continents⚡#oceans⚡#earth⚡#geography⚡#nature 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #387 · 18.10.2025 г., 15:31

🌍 The Pacific Ocean is wider than the entire Moon. At its widest, it stretches over 19,000 kilometers from Asia to the Americas—more than the Moon’s diameter of 3,474 kilometers. ✨ #continents⚡#oceans⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #261 · 18.09.2025 г., 20:12

🌍 Earth’s surface area is about 510 million square kilometers—more than 70% is covered by oceans, making our home a true water planet among the rocky worlds of our Solar System. ✨ #Earth⚡#oceans⚡#planet⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Amazing Geography 🌍

@amazingeo · Post #155 · 01.09.2025 г., 09:12

🌍 The Southern Ocean, officially recognized in 2021, surrounds Antarctica and connects the Atlantic, Pacific, and Indian Oceans, forming a unique ring of cold currents that help regulate Earth’s climate. ✨ #continents⚡#oceans⚡#climate⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Amazing Geography 🌍

@amazingeo · Post #345 · 07.10.2025 г., 20:31

🌍 Earth’s mountain-building processes are still active—over 80% of volcanoes erupt near tectonic plate boundaries, constantly creating new land and even islands in the world’s oceans. ✨ #geology⚡#volcanoes⚡#oceans⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #692 · 16.04.2026 г., 20:31

🌍 The Atlantic Ocean is growing wider each year as the Americas slowly drift apart from Europe and Africa, adding about 2.5 centimeters annually—roughly the speed fingernails grow. ✨ #continents⚡#oceans⚡#tectonics⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #348 · 08.10.2025 г., 18:31

🌍 The Eurasian and North American continents are moving apart by about 2.5 centimeters every year along the Mid-Atlantic Ridge, slowly widening the Atlantic Ocean over millions of years. ✨ #continents⚡#oceans⚡#tectonics⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #462 · 18.11.2025 г., 20:31

🌍 Antarctica is the only continent entirely surrounded by ocean and is nearly twice the size of Australia. Its thick ice reflects sunlight, helping regulate Earth’s overall temperature. ✨ #continents⚡#oceans⚡#Antarctica⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #238 · 15.09.2025 г., 00:12

🌍 Salt marshes along coastlines act as natural buffers, soaking up floodwaters and trapping sediment. These unique habitats store carbon more efficiently than most forests. ✨ #coastline⚡#wetlands⚡#oceans⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

ПретходнаСтраница 1 од 4Следна