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

Резултати

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

Пребарај: #asianfencing

当前筛选 #asianfencing清除筛选
Oʻzbekiston Qilichbozlik Federatsiyasi

@fencinguzbekistan · Post #5499 · 05.12.2025 г., 12:18

⚔️ The Sabre Grand Prix is underway in Orléans! Strong Asian presence from: 🇯🇵 Japan, 🇰🇷 Korea, 🇭🇰 Hong Kong, 🇨🇳 China, 🇺🇿 Uzbekistan, 🇰🇿 Kazakhstan, 🇯🇴 Jordan, 🇮🇷 Iran, 🇰🇼 Kuwait, 🇲🇾 Malaysia, 🇸🇦 Saudi Arabia, 🇸🇬 Singapore, 🇹🇼 Chinese Taipei. 🔥 14 Asian athletes advance to the December 6 main draw. Good luck to all! 📸 Photos by Eva — FIE Team #FIE#FCA#AsianFencing

Oʻzbekiston Qilichbozlik Federatsiyasi

@fencinguzbekistan · Post #6031 · 19.02.2026 г., 15:47

All delegations have arrived… and the real preparation begins ⚔️🔥 Athletes have started their official training sessions at the competition venue, ahead of tomorrow’s Asian Cadet & Junior Fencing Championships, featuring a large participation of Asia’s rising talents 🌏 Sharp focus, strong determination, and exciting energy ahead of the first bout 🏆 Tomorrow… it begins. 🌐www.asian-fencing.com Follow @fencing_fca #AsianFencing#FCA#CadetJunior#RoadToGlory

Oʻzbekiston Qilichbozlik Federatsiyasi

@fencinguzbekistan · Post #5850 · 24.01.2026 г., 10:05

⏳ Just 1 month to go! Asia’s future fencing stars will meet in Jakarta, Indonesia 🇮🇩 for the Asian Cadet & Junior Fencing Championships 2026 🤺 📅 20–27 February 2026 📍 Jakarta The countdown is on. Are you ready? 🔥 🌐www.asian-fencing.com Follow @fencing_fca #AsianFencing #FCA #AsianCadetJunior #Fencing2026 #Jakarta2026

Oʻzbekiston Qilichbozlik Federatsiyasi

@fencinguzbekistan · Post #4897 · 24.10.2025 г., 17:43

🥇🏆 The Moment of Glory! A proud scene from the podium at the Asian Cadet Fencing Championships – Kuala Lumpur 2025 🇲🇾⚔️ From Hong Kong to Kazakhstan and Uzbekistan, fencers shined with skill, passion, and true sportsmanship 💪 Congratulations to the Men’s Foil medalists on an outstanding performance and well-deserved victories! 👏 🥇 HO Shing Him Harris 🇭🇰 🥈 LAM Ho Long 🇭🇰 🥉 NURUMOV Galim 🇰🇿 🥉 MOLINA Ilyas 🇺🇿 #Fencing#AsianFencing#MensFoil#KualaLumpur#FencingAsia#Championships#FencingSpirit

Oʻzbekiston Qilichbozlik Federatsiyasi

@fencinguzbekistan · Post #3876 · 01.05.2025 г., 09:29

🏆 Asian Senior Fencing Championship – Bali 2025 🗡️ This is where legends are forged ✨ Where pleasure 🎉, dignity 🛡️, and the spirit of competition 🔥 collide! The thrill of victory 🥇, the clash of steel ⚔️, and the soul of competition 🏃‍♂️ All in one place — glory carved in blades, legends born in every touch ⚡ #Bali welcomes the elite 🤺 #AsianFencingChampionship 2025 🌏 #FCA#FencingAsia#Bali2025 #FencingPower#BladesOfGlory#Honor#AsianFencing

Oʻzbekiston Qilichbozlik Federatsiyasi

@fencinguzbekistan · Post #4078 · 06.06.2025 г., 18:16

🔟 Only 10 Days to Go! The countdown has begun for Asia’s ultimate fencing spectacle ⚔️🌏 Get ready as the 2025 Asian Senior Fencing Championships land on the breathtaking island of Bali! 🌺🌴 📍 Bali, Indonesia 🇮🇩 📅 June 17–23, 2025 ⏳ Seven days. One stage. Endless glory. ✨ Witness: ⚡ Elite fencers from across Asia battle for supremacy 🔥 Unforgettable showdowns & rivalries reborn 🥇 New legends rising — champions forged in every bout 🎯 Precision. Passion. Power. Every point is everything. 📡 Stay tuned for: 🔴 Live updates 🎞️ Daily highlights 🎥 Behind-the-scenes action 📸 Exclusive content you won’t want to miss! 🚀 The road to greatness starts now — and it leads through Bali. Don’t just watch history… be part of it. 🔽 Follow us & gear up for the fight of the year! #AsianFencing#Bali2025#UnleashTheBlade #CountdownToGlory#FencingAsia#SeniorFencing #ChampionsRise#BladesOfAsia#FIE#TopFencers #Indonesia#FencingElite#RoadToVictory#AFC