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

Пребарај: #ramadanchallenge

当前筛选 #ramadanchallenge清除筛选
WESTER School

@wester_uz · Post #3561 · 11.03.2025 г., 00:00

#RamadanChallenge Lesson 2:🎬 📌Listening: Types of Listening Questions Part 1 and Part 2 👨‍🏫 Speaker: Mr. SaidIslom - Overall: 8.5 (Listening:9.0) 📆 Date: 11.03 ⏰ Time: 06:00 Venue: 📌@westerschool_IELTS

Doniyor Olimjonov English | IELTS

@doniyorieltss · Post #1227 · 24.03.2023 г., 11:15

Many governments think that economic progress is their most important goal. Some people, however, think that other types of progress are equally important for a country. Discuss both these views and give your own opinion. It goes without saying that for a nation to flourish its economy needs to be robust, which may lead many authorities to believe that developments in this field should be their sole priority. However, I believe that there are other, possibly more important, aspects to consider. The natural instinct, when a nation is on the brink of a development or recession, is to question its economic soundness. After all, it is wealth that decides a country's fate in most cases. Take the UAE, a previously desolate dessert that is currently home to hundreds of thousands of high-rise buildings. If it hadn't been for its rich natural resources, it wouldn't have gone from abject 'nothingness' to what is now known as the richest nation in the world. In addition to its affluency, this nation is also renowned for its rich culture, which could be explained by the fact that it is a mainstream tourist destination. People from all backgrounds flock to this place in search of a better life, making it all the more popular. Thus, it is safe to say that the economy should, in fact, get a lot of the attention. But it would be unfair if the economy alone received all the credit for a nationwide success. There are usually other rather obscure sectors that inevitably spotlight economic developments as being responsible for any type of improvement in a country. Without a healthy population, for example, it is almost impossible for a society to exist, let alone thrive. One such example is Africa where, despite its rich resources, sickness and poverty run rampant. The economy doesn't signify at this point, as all the existing resources are squandered on treating the ever-increasing diseases. Education plays another important role in this regard. Having quality or poor education can mark the difference between a bright and a grim future for young people that will one day contribute to the national workforce. In other words, it is schools where any type of development begins. Economic strides are certainly essential — it is thanks to them that a country can compete with its counterparts in wealth and power. However, there won't be an economy to boost unless other types of progress, such as the medical and educational ones, receive the same level of attention, if not more. After all, these are the stepping stones to improved economy, which is the path to a better future. #MyWriting#RamadanChallenge @ieltsulugbeks

Doniyor Olimjonov English | IELTS

@doniyorieltss · Post #1220 · 23.03.2023 г., 02:44

#WritingTask2#Economy#RamadanChallenge Many governments think that economic progress is their most important goal. Some people, however, think that other types of progress are equally important for a country. Discuss both these views and give your own opinion. I will soon send my plan and sample answers for this task. @ieltsulugbeks