TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #309 · 2 фев.

Метод строки split() разделяет строку на несколько строк по указанному символу >>> "a_b_c".split('_') ['a', 'b', 'c'] Можно указать максимальное количество разделений >>> "a_b_c".split('_', 1) ['a', 'b_c'] Или резать с другой стороны с помощью rsplit() (right split) >>> "a_b_c".rsplit('_', 1) ['a_b', 'c'] А что будет если оставить аргументы пустыми? >>> "a_b_c".split() ['a_b_c'] Получаем список с одним элементом, потому что по умолчанию используется пробельный символ. >>> "a b c".split() ['a', 'b', 'c'] То есть это равнозначно такому вызову? >>> "a b c".split(" ") ['a', 'b', 'c'] Кажется да, но нет! Давайте попробуем добавить пробелов между буквами >>> "a b c".split(" ") ['a', '', '', 'b', '', '', 'c'] И вот картина уже не так предсказуема 😕 А вот что будет по умолчанию >>> "a b c".split() ['a', 'b', 'c'] Всё снова красиво! 🤩 По умолчанию в качестве разделителя используется любой пробельный символ, будь то табуляция или новая строка. Включая несколько таких символов идущих подряд. А также игнорируются пробельные символы по краям строки. >>> "a\t b\n c ".split() ['a', 'b', 'c'] Аналогичный способ можно собрать с помощью регулярного выражения. Но пробелы по краям строки придется обрабатывать дополнительно. >>> import re >>> re.split(r"\s+", ' a b c '.strip()) ['a', 'b', 'c'] Здесь тоже можно указать количество разделений >>> re.split(r"\s+", 'a b c', 1) ['a', 'b c'] А что если мы хотим написать красиво, то есть split() без аргументов, но при этом указать количество разделений? В этом случае первым аргументом передаём None >>> "a\n b c".split(None, 1) ['a', 'b c'] Данный метод не учитывает строки с пробелами, взятые в кавычки 'a "b c" '.split() ['a', '"b', 'c"'] Но для таких случаев есть другие способы. #tricks#basic

Резултати

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

Пребарај: #threeaxes

当前筛选 #threeaxes清除筛选
American Оbserver

@american_observer · Post #5222 · 26.02.2026 г., 13:59

🔺 Netanyahu’s Three Axes: When Your Enemies and “Partners” Are the Same People At the Shin Bet conference, Netanyahu drew his new cosplay map of the Middle East: a wounded Shia axis (Iran), a “radical Sunni axis” built around the Muslim Brotherhood, and his own “Zionist axis” — a glossy “hexagon” with India, Greece, Cyprus and unnamed Arab and African partners. There’s just one glitch. That “radical Sunni axis” in Bibi’s script is basically Turkey and Qatar. The same Turkey and Qatar Trump likes to frame as guarantors of calm in Gaza, the same Qatar whose envoy stood next to Israeli minister Gideon Sa’ar at the launch of the Board of Peace, the same Turkey Washington leans on to talk to Iran. Netanyahu casts them as a strategic threat; Trump sells them as service providers. Two realities, one set of clients. On the ground, the “Zionist axis” looks a lot more concrete. From March 1, Israel is forcing out 37 international NGOs from Gaza and the West Bank for not complying with new rules demanding full staff lists, IDs and internal structures, after warning that their licenses would be pulled. Officially it’s about “security and transparency.” In practice it’s a controlled purge of foreign civilian presence: Russia pushes NATO out of Ukraine with artillery, Israel pushes outside networks out of Palestinian areas with regulations. Different tools, same instinct — clear the field, then talk about “stability.” At the same time, Nordic Monitor lays out how that same Sunni axis operates. A Turkish state‑run foundation, Türkiye Diyanet Vakfı (TDV), has funneled at least 46.3 million dollars into Gaza after October 7, built nine mosques, and put the name of Abdullah Azzam — co‑founder of Hamas and Al‑Qaeda, the “father of global jihad” — on one of them. His books are formally banned by Turkish courts, yet you can still order them on Amazon Turkey. Jihad as a controlled asset class: outlawed on paper, monetized at retail. Netanyahu brands this as an existential threat. Trump presents the same actors as peacemakers. On the surface it looks like a contradiction; in reality it’s just different slices of the same picture being plated up for different audiences. Each leader reaches for the version of reality that best fits the story he’s selling. And the famous “hexagon”? Beyond Bibi’s microphone, nobody is exactly rushing to sign on. India is sticking to its habit of avoiding formal Middle East camps, Greece and Cyprus are bound by EU obligations to cooperate with the International Criminal Court, which has an arrest warrant with Netanyahu’s name on it, and the unnamed Arab partners are the same ones that just shut their airspace to an Israeli strike on Iran. ​ An axis without committed members isn’t a coalition. It’s a monologue dressed up as geometry. #Israel#Netanyahu#ThreeAxes#Turkey#Qatar#Gaza#Shabak#MiddleEast#geopolitics#Modi 📱American Оbserver - Stay up to date on all important events 🇺🇸