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

Резултати

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

Пребарај: #submissions

当前筛选 #submissions清除筛选
bjjfanaticsinstructionals

@bjjfanaticsinstructionals · Post #1920 · 03.03.2026 г., 17:27

😁Magids Abstract Armlocks by Magid Hage😁 ➡️Get ready to see armlocks in a whole new light. In Magid’s Abstract Armlocks, world-class black belt and competition standout Magid Hage takes you deep into the world of unconventional, creative, and downright sneaky armlock attacks. ➡️Whether you're attacking from guard, top position, scrambles, or even from “bad” spots — you’ll learn how to hunt arms from anywhere. $79😍$6.99😍 ❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️ 📱Payment: 📱📱📱 💰Submeta FOR FREE 👑MasterClass ✈️@bjjfanaticsinstructionals #MagidHage#Submissions#NoGi#IBJJF 💁‍♀️Buy 💁‍♀️

bjjfanaticsinstructionals

@bjjfanaticsinstructionals · Post #1842 · 17.07.2025 г., 23:47

😁Attacking Outside Finishing Inside by Lucas Kanard😁 ➡️Unlock the secret to seamless offense with Attacking Outside, Finishing Inside, the revolutionary BJJ instructional series by Lucas Kanard. ➡️Designed to elevate your game by blending lower body attacks with precise upper body finishes, this system keeps your opponents guessing—and trapped. ̶$̶7̶9̶😍$9.99😍 ❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️ 📱Payment: 📱📱📱 💰Submeta FOR FREE 🌈UFC Picks 👑MasterClass ✈️@bjjfanaticsinstructionals #LucasKanard#Passing#NoGi#Submissions 💁‍♀️Buy 💁‍♀️

bjjfanaticsinstructionals

@bjjfanaticsinstructionals · Post #1952 · 30.04.2026 г., 23:43

🐈‍⬛NEW RELEASE 🐈‍⬛ 🐈‍⬛Woj Lock 2.0 - Completing The Leg Lock Game by Chris Wojcik 🐈‍⬛ 🐈‍⬛Chris Wojcik isn’t just a leg locker—he’s one of the most innovative finishers in modern grappling, known for catching high-level opponents with his signature “Woj Lock” system. 🐈‍⬛From foundational concepts to advanced 50/50 systems, cross ashi, inside ashi, and beyond—Wojcik shows you how to connect entries, control, and finishing mechanics into one seamless chain. $79 🐈‍⬛$9.99 🐈‍⬛ ❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️ 📱Payment: 📱📱📱📱 💰Submeta FOR FREE 👑MasterClass ✈️@bjjfanaticsinstructionals #ChrisWojcik#Submissions#NoGi#ADCC 🐈‍⬛Buy 🐈‍⬛

bjjfanaticsinstructionals

@bjjfanaticsinstructionals · Post #1933 · 12.04.2026 г., 00:33

😁Z locks and the Diagonal Ashi: the Complete Guide by Robert Degle😁 ➡️More than any other leglocking strategy the Diagonal Ashi and Z lock allow us to remain safe from counter leglocks and solve the problem of defensive hip movement by allowing us to adhere to the principle of double trouble while we execute devastating leglock submissions. $97😍$9.99😍 ❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️ 📱Payment: 📱📱📱 💰Submeta FOR FREE 👑MasterClass ✈️@bjjfanaticsinstructionals #RobertDegle#Submissions#NoGi#ADCC

bjjfanaticsinstructionals

@bjjfanaticsinstructionals · Post #1932 · 12.04.2026 г., 00:32

😁Samurai Submissions: finish Quickly From Turtle by Kenta Iwamoto😁 ➡️In Samurai Submissions, BJJ’s fastest-rising star and B-Team standout breaks down his signature system for lightning-fast, high-percentage submissions from turtle — attacks so sneaky your opponents won’t realize they’re in danger until it’s already over. ➡️Kenta’s approach is brutally efficient: minimal movement, tight control, and submissions that hit before your opponent can react. $127😍$9.99😍 ❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️ 📱Payment: 📱📱📱 💰Submeta FOR FREE 👑MasterClass ✈️@bjjfanaticsinstructionals #KentaIwamoto#Submissions#NoGi#CJI

bjjfanaticsinstructionals

@bjjfanaticsinstructionals · Post #1862 · 16.09.2025 г., 23:00

🔥NEW RELEASE🔥 😁Upper Lower Chains Links that Solve Problems Faster by Josh Saunders😁 ➡️Unlock the secret to faster problem-solving and fluid movement on the mats with Upper Lower Chains Links that Solve Problems Faster, an innovative BJJ instructional by Josh Saunders — a 2x ADCC Trials winner and ADCC semifinalist. ➡️This groundbreaking approach empowers practitioners to adapt, innovate, and respond to challenges in real-time, making your game more dynamic and intuitive. $79😍$9.99😍 ❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️ 📱Payment: 📱📱📱 💰Submeta FOR FREE 🌈UFC Picks 👑MasterClass ✈️@bjjfanaticsinstructionals #JoshSaunders#Submissions#NoGi#Transitions 💁‍♀️Buy 💁‍♀️

bjjfanaticsinstructionals

@bjjfanaticsinstructionals · Post #1888 · 04.12.2025 г., 21:02

😁Rethink Front Headlocks: Control And Submit Larger People by Josh Janis😁 ➡️Discover a smarter, more effective way to dominate from the front headlock—especially against larger, stronger opponents. ➡️With this series, you’ll learn how to systematically break posture, create off-balance reactions, and chain submissions—even on opponents who normally overpower you. $79😍$9.99😍 ❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️ 📱Payment: 📱📱📱 💰Submeta FOR FREE 👑MasterClass ✈️@bjjfanaticsinstructionals #JoshJanis#Guillotines#NoGi#Submissions 💁‍♀️Buy 💁‍♀️