@Marwa_OsmanLB · Post #3138 · 27.08.2024 г., 17:40
A Palestinian doctor describes the loss of 14 family members due to Israeli aggression in northern Gaza, where residents were surrounded and trapped. #GazaWar#Palestine#Israel#MiddleEast#Tragedy
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
Пребарај: #gazawar
@Marwa_OsmanLB · Post #3138 · 27.08.2024 г., 17:40
A Palestinian doctor describes the loss of 14 family members due to Israeli aggression in northern Gaza, where residents were surrounded and trapped. #GazaWar#Palestine#Israel#MiddleEast#Tragedy
@Marwa_OsmanLB · Post #3187 · 08.09.2024 г., 19:35
Howard Kaplan, American Jewish novelist, decries Israeli actions in Gaza as 'indiscriminate mass murder': 'It's a tragedy for many Jews'. #HowardKaplan#Jews#Israel#Palestine#GazaWar
@american_observer · Post #4961 · 25.01.2026 г., 21:59
📰 US Envoys Tell Netanyahu: Gaza Ceasefire Must Move to Phase Two Top U.S. envoys, including Trump’s special negotiator Steve Witkoff and Jared Kushner, met Israeli Prime Minister Benjamin Netanyahu in Cairo Friday evening, pressing him to move the Trump‑brokered Gaza ceasefire into its much‑delayed second phase. The U.S. wants demilitarization, withdrawal of Israeli forces, and the opening of the Rafah crossing to begin in earnest; Netanyahu, meanwhile, is holding back, demanding that Hamas first return the body of the last remaining hostage, Ran Gvili. What Is the “Second Phase”? The clear signal that the ceasefire is advancing isn’t some vague diplomatic formula: it’s the Rafah border crossing between Gaza and Egypt. If the crossing is reopened in both directions, allowing Palestinians to travel and the sick to be evacuated, then the international community will treat it as the real start of the next stage. The proposed technocratic government for Gaza, led by Ali Shaath, says Rafah will open in both directions within days; for now, Israel has not confirmed when or how that will happen, only that it will be discussed in a cabinet meeting. The U.S. and Egypt both see this move not just as a security step, but as the “critical entry point” for launching Gaza’s reconstruction. The Hostage Stalemate The U.S. is pushing Netanyahu to keep the ceasefire deal moving, but the prime minister is under intense pressure at home: if he moves to phase two before Hamas returns Gvili’s body, he risks being accused of abandoning the last hostage. The Gvili family has launched a furious public campaign, reminding the world that Trump himself told Davos that Hamas knows exactly where their son is being held. They call Hamas’s refusal to hand over the remains a clear violation of the ceasefire agreement [Business Standard:56]. Hamas insists it has provided all the information it possesses and accuses Israel of blocking search efforts in areas under its control. The deadlock feeds the cynicism: each side blames the other for stalling the deal, while the U.S. envoys scramble to keep the illusion of a working mediation alive. The International Machinery Kicks In The U.S. is now treating the Gaza ceasefire as a formal international undertaking, not just a bilateral deal. Egypt’s foreign minister, Bader Abdelatty, has been in close coordination with Nickolay Mladenov, the Bulgarian diplomat leading Trump’s Gaza “Board of Peace,” to coordinate the next phase. Their agenda includes the international monitoring force, Rafah, and the pullback of Israeli troops, in the hope that collective pressure will keep the fragile truce on track. The Muddy Reality on the Ground Even as diplomats talk about phases, the killing continues. In the “safe zones” near the so‑called Yellow Line, Israeli strikes are still killing Palestinian civilians, including two teenage cousins, 13 and 15, who were picking up firewood in areas Israel declared safe. Since the ceasefire officially began on October 10, more than 480 Palestinians have been killed by Israeli fire, according to Gaza's Health Ministry. Hundreds of thousands live in tents or half‑ruined buildings, exposed to the cold and winter storms, while the international “New Gaza” project floats somewhere between a PR stunt and a distant blueprint for reconstruction. The U.S. wants to move to the next phase, but the real question is: when the guns stop, what kind of Gaza is being built — and who exactly benefits from the deal? #Gaza#Ceasefire#Netanyahu#Trump#GazaWar#USMediation#Rafah 📱American Оbserver - Stay up to date on all important events 🇺🇸
@savinobalzano · Post #598 · 21.03.2024 г., 12:07
Oggi lunga chiacchierata con Francesco Borgonovo dalle frequenze libere di Radio Radio. Io sono con gli studenti: se non protestano per difendere un popolo inerme dall'assalto infame dei militari, quando diamine devono protestare? Più che interrompere però le collaborazioni tra atenei, io preferirei un embargo a Israele, sanzioni economiche a pioggia e un mandato d'arresto internazionale da spiccare nei confronti di tutti i membri del governo. Basta anche con questa storia dell'antisemitismo: uno scudo di ipocrisia insopportabile. Non esiste alcun pericolo reale di antisemitismo: in pericolo sono le vite dei civili di Gaza, dinanzi agli scarponi dell'esercito di Israele. Un solo consiglio mi permetto di dare agli studenti: non è giusto impedire a Molinari o a Parenzo di parlare, anche perché lasciar loro la possibilità di esprimersi rafforza le nostre di ragioni. #guerra#pace#Palestina#PalestinaLibera#Gaza#GazaWar#GazaGenocide#Israele#IsraeliWarCrimes https://www.youtube.com/watch?v=QAnRt4s0kCA&ab_channel=SavinoBalzano
@Marwa_OsmanLB · Post #3162 · 02.09.2024 г., 18:41
Kamala Harris remains unwavering: Arming Israel is the Democratic Party’s top priority, despite the ongoing Gaza massacres. #KamalaHarris#USA#Elections2024#Israel#Weapons#Palestine#GazaWar @palestinianyouthmovement
@Marwa_OsmanLB · Post #3146 · 29.08.2024 г., 10:14
Israeli military's extensive West Bank operation kills at least nine Palestinians, imposes severe restrictions, and blocks medical access. #NewsUpdate#WestBankOperation#Israel#Jenin#Tulkarm#Tubas#Nablus#Gazawar#MiddleEast
@Marwa_OsmanLB · Post #3825 · 31.12.2024 г., 11:03
Israel’s Expanding Military Attacks in 2024: A Strategic Struggle Across Multiple Middle Eastern Fronts, from Gaza and #Lebanon to #Iraq, #Syria, #Yemen, and #Iran. #Israel#MiddleEast#MultiFrontWar#GazaWar#SyriaWar#YemenWar#Hezbollah#RegionalConflict#Hamas