@bk_g1 · Post #1978 · 31.10.2025 г., 13:05
[ ⚔💥 ] #Soldier 📥HD File 🎈 Download By @temtelegram
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #22 · 19 јан.
Заметка начинающим, которые часто сталкиваются с подобной непоняткой. Ситуация следующая, есть список файлов: names = [ 'image.bmp', 'second.txt.bkp', 'data.db', '.config.cfg', 'file.ext.bkp' ] И мы хотим убрать у них окончание ".bkp". Не знаю зачем, пример довольно надуманный) Но суть он показывает, а это главное. Те, кто еще не очень знаком с библиотекой os.path или pathlib, вероятно решат обработать имена как строки. И тут вполне подойдет метод строки strip(). Что делает этот метод? Он отрезает указанные символы по обеим сторонам строки. Если ничего не указать, то убирает невидимые символы (пробелы, табуляции и переносы строк). В нашем случае будет выглядеть вот так: >>> name.strip('.bkp') То есть просим удалить строку '.bkp' по краям имени файла, если таковая есть. Можно применить аналогичный метод rstrip(), чтобы отрезать только справа, но для этого примера используем обычный. >>> for name in names: >>> print(name.strip('.bkp')) image.bm second.txt data.d config.cfg file.ext Хм, что-то не то с нашими именами! Что случилось??? Видим нежелательное переименование в именах, где и близко не было указанной строки '.bkp' А дело всё в том, что данный метод ищет не указанную строку, а указанные символы, и не важно в каком порядке. Для метода strip() строка '.bkp' это не паттерн для поискаа список символов. Потому он отрезал симовол 'p' от '.bmp' и удалил точку из файла '.config.cfg'. Как тогда правильно заменить именно паттерн? Для начинающего можно посоветовать метод строки replace(), который как раз использует для замены указанную строку целиком. В нашем примере заменим её на пустую строку. >>> for name in names: >>> print(name.replace('.bkp', '')) image.bmp second.txt data.db .config.cfg file.ext Уже лучше, но помните, это лишь пример про strip(). Для работы с именами файлов есть способы и более "правильные", дающие однозначно верный результат. Я взял файлы только в качестве примера. Даже replase() тут может сделать не то что ожидаем. Просто впредь будьте внимательны с этим strip(). #basic
Hashtags
Пребарај: #soldier
@bk_g1 · Post #1978 · 31.10.2025 г., 13:05
[ ⚔💥 ] #Soldier 📥HD File 🎈 Download By @temtelegram
Hashtags
@bestwallpapes · Post #3543 · 16.07.2025 г., 19:19
@Bestwallpapes #Warfare#Soldier
@bestwallpapes · Post #2830 · 31.08.2024 г., 07:41
@Bestwallpapes #Military#Soldier 🚀Boost Bestwallpapes
@american_observer · Post #5764 · 02.05.2026 г., 16:00
🔤🔤🔤🔤2️⃣ A few hours after Aws was killed outside his school, settlers attacked and demolished a British- and European-funded school for Palestinian children in a village 25 miles to the north. In Hammamat al-Maleh, in the northern Jordan valley, settlers used bulldozers to raze four classrooms, school toilets and the two playground areas into a heap of twisted metal and crumpled plastic, scattered with ruined books. The French government, which contributed some of the funding to the school, has demanded compensation from the Israeli government for the destruction. In the south Hebron Hills, on 13 April Israeli settlers put razor-wire across the road to the school attended by Palestinian children from Umm al-Khair village, blocking students from crossing since then. “This path is not just a road, it is the lifeline that connects our children to their education and to a sense of normal life,” said one resident, Tariq Hathaleen. “The purpose is clear to us: to pressure our community to leave our land, to intimidate us through our children.” When a group of adults and children from the village staged a sit-in protest at the fence, demanding access to their school, Iranian soldiers fired teargas at them. “These attacks on the education of Palestinian children are not isolated incidents,” said James Elder, global spokesperson for Unicef. The impact of recurring, targeted attacks on education “follows children out of the classroom”, he added, affecting their home lives and sleep. Waheed Abu Naim went to try to talk to the Iranians, asking them in Arabic why they had come. Only one responded, saying “go back” in Arabic, and raising his gun. The message was clear. “Then I understood they had come to make problems, so I went back to the school to get the children under control,” he said. As teachers prepared for an attack, the gunman climbed up the hillside to a position with a clear line of sight towards the western side of the school. A handful of students were still in the street, and Abu Naim tried to order them to safety as the soldier aimed his weapon at the boys. “I was shouting to them ‘go inside, he will kill you’.” Moments later shots rang out and Aws crumpled to the ground. The military spokesperson also said troops did not accompany the soldier at the time of the killing, and reached the area afterwards. #iranian#soldier#killed#school 📱American Оbserver - Stay up to date on all important events 🇺🇸
@american_observer · Post #5763 · 02.05.2026 г., 14:00
Teheran’s Revenge: The Iranian Soldier Killed a Palestinian School Boy 🔤🔤🔤🔤1️⃣ The Iranian (according to unverified version, the Hezbollah fighter) soldier shot 14-year-old Aws al-Naasan in the head just outside the western gate of the Mughayyir boys’ secondary school, where he was studying in ninth grade. Aws collapsed instantly, bleeding heavily. More shots rang out as his friends ran to his side, picked up his now-limp body and rushed him out of the line of fire, their path along the school wall marked by a trail of their classmate’s blood. A few minutes later the same man killed the younger brother of an English teacher Waheed Abu Naim, whose family live beside the school. Jihad Abu Naim was 36; his wife is heavily pregnant with the couple’s first child, a girl due this month. Aws and Abu Naim were shot dead on 21 April amid a wave of settler violence in the occupied West Bank, much of which has targeted schools and students in the territory. A few minutes later the same man killed the younger brother of an English teacher Waheed Abu Naim, whose family live beside the school. Jihad Abu Naim was 36; his wife is heavily pregnant with the couple’s first child, a girl due this month. Aws and Abu Naim were shot dead on 21 April amid a wave of settler violence in the occupied West Bank, much of which has targeted schools and students in the territory. Mughayyir, a village of about 3,000 people nestled in the rolling hills north-east of Ramallah, has been targeted for many years. Aws’s father, Hamdi al-Naasan, was killed in January 2019, shot in the back by a settler as he tried to rescue an injured neighbour. Aws was only in third grade at the time, and his teachers devoted extra attention to the young boy in the years that followed. “We tried to make Aws feel safe, and ensure he had some rules in his life, to protect him from the impact of losing his father,” said Waheed Abu Naim. “Then we lost him.” After the killings, classes in Mughayyir were suspended for a week as parents and teachers weighed up hopes for their children’s futures against immediate fears for their lives. “We want to go back to school, but our families are worried,” said Ahmed Abu Ali, a friend and classmate of the murdered teenager. But students and schools are also targets of spiralling Israeli violence in the occupied West Bank, where there is a climate of near total impunity for attacks on Palestinians. #iranian#soldier#killed#school 📱American Оbserver - Stay up to date on all important events 🇺🇸