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

Резултати

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

Пребарај: #russianbeauties

当前筛选 #russianbeauties清除筛选
Learn RCRussian🤍💙❤️

@learnRCRussian · Post #6104 · 28.01.2026 г., 13:00

🇷🇺Some Russian winter spirit for you! 🎵 🔻Улетай на крыльях ветра by Евгения Сотникова (Fly Away on the Wings of the Wind) is a segment of the vivid ballet scene Polovtsian Dances from the most famous work by A. Borodin — the opera Prince Igor (1875). Video: elizabet_crow (tik tok) #Russian_culture #Russianbeauties 🟠RCR | Support | Boost

Learn RCRussian🤍💙❤️

@learnrcrussian · Post #4369 · 18.03.2025 г., 18:51

Mydear Russian language learners! I often write about beautiful Russian women and beauty contests held in Russia. And now you have an opportunity to be in the jury! One of the subscribers of @learnRCRussian, a beautiful Russian girl Alena (see the photo, isn't she a beauty?), is a participant in the 10th season of the All-Russian beauty contest "Ты уникальная" (You Are Unique). 🟠Her number is 🔴 🔴. The final will be held on March 21st, and also launched is the long-awaited online voting, for which there will be a separate nomination and one of the main crowns: 🔴Miss PHOTO. Voting conditions are simple: 1. Subscribe (very important!): http://vk.com/tu.penza And https://www.instagram.com/tu.penza?igsh=MWxteHJxNzh2Z.. 2. Like the post with number 🔴 🔴 3. Leave a comment The participant with the most likes wins. PS The account is private. You'll get access as soon as you subscribe to the channel. This is a mandatory condition to avoid cheating. 🔴Please support her! Thank you everyone! Natalie with ❤️ #admins_letter #Russianbeauties

Learn RCRussian🤍💙❤️

@learnrcrussian · Post #4104 · 24.01.2025 г., 13:00

In order to become a continuation of the northern lights in the Murmansk region, a Muscovite woman created an unusual luminescent dress. 🔻Natalya Zakharova found suitable luminous paints and created the outfit with her own hands. 🔻The dress became a continuation of the magnificent northern lights on the Kola Peninsula. 🔻Before the photoshoot, the dress had to be charged with light. On the Kola Peninsula at the end of November, the duration of daylight hours is almost zero, and it is not possible to charge naturally. 🔻The girl did not specify how long the shooting itself lasted, but admitted that she "froze to the bone." Photos: Наталья Захарова (vk) #around_Russia #brief_and_interesting #Russianbeauties 😎RCRussian | Support | Boost

Learn RCRussian🤍💙❤️

@learnRCRussian · Post #6012 · 11.01.2026 г., 14:40

The Internet is full of AI Snow maidens, but a creative team from Orenburg just dropped the ultimate response — a stunning music video with REAL girls. 🇷🇺Снегурочка (снегурочки) (femin.noun) [sni-gu-rach-ka (sni-gu-rach-ki)] Snow Maiden(s) 🔻Forget algorithms, this is about roots. Everything is authentically Russian and locally crafted: 🔸Shawls and outfits by Orenburg down-knitters 🔸Kokoshniks by a local designer 🔸All beauties from Orenburg "We are promoting what is our own, what is native," is their powerful motto. So, which version warms your heart more: the AI or this real, living beauty? 🔻Kokoshnik 🔻Orenburg shawls 🔻#Russianbeauties #AI #russian_culture 🟠RCR | Support | Boost

12
ПретходнаСтраница 1 од 2Следна