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

Резултати

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

Пребарај: #gupayteamcup

当前筛选 #gupayteamcup清除筛选
Gumart Announcement 🛒

@gumartec · Post #267 · 09.06.2025 г., 10:23

🏆 GuPay Team Cup – 2025 FIFA Club World Cup Edition is LIVE! ⚽️ Choose your team. Power it with every transaction. From the pitch to the blockchain — this is where Web3 meets real-world passion. ⚽️ 🗓 June 9 – July 15, 2025 Support 1 of 32 legendary clubs from the official 2025 FIFA Club World Cup, use GuPay, and help your squad rise to the top! 🎯 How to join: 1️⃣Pick your favorite club by filling out the registration form: link 2️⃣ Make transactions using GuPay throughout the tournament 3️⃣ Each transaction boosts your team’s total score on the leaderboard 🎁 $5,000 Prize Pool The entire reward will be shared among users who joined the team with the highest total transaction volume via GuPay during the campaign. 📌 Fill the form now to lock in your team choice: link 📊 Team standings and leaderboard will be updated regularly — stay tuned! 🌐 From sport to spending, culture to crypto — Gumart is bringing Web3 to real life, one goal at a time. #GuPayTeamCup#GuGiveaway

Gumart Announcement 🛒

@gumartec · Post #265 · 06.06.2025 г., 07:34

🏆 GuPay Team Cup – FIFA Vibes, $5,000 Prize Pool! 📈 Something big is coming to GuPay... and it’s dressed in jerseys, flags, and fire.✨ ⚽️ 32 teams - inspired by the world of FIFA 💥 Fierce competition, full of national pride 💰A massive $5,000 prize pool waiting at the finish line Choose your team. Make your moves. Support your side and help them rise to the top. Can you guess what’s coming? Stay tuned 👀 #GuPayTeamCup#GuGiveaway

Gumart Announcement 🛒

@gumartec · Post #275 · 29.06.2025 г., 15:49

🛍 GuPay Team Cup – Midway Update: Who’s Leading the Race? It’s been nearly three weeks since the GuPay Team Cup kicked off - and the competition is getting intense! With thousands of Gumart residents rallying behind their favorite FIFA clubs, the blockchain scoreboard is anything but predictable. ⚽️💸 Here’s the current Top 4 (by GuPay transaction volume): 🥇 Real Madrid – Still leading with unstoppable momentum 🥈Chelsea – Not far behind, showing strong team spirit – A surprise rise from Africa 🏅Al Hilal SFC – Consistency and strategy paying off 🏅Manchester City – Still showing its strength 🎉Remember: $5,000 prize pool will be distributed to users who joined the team with the highest total GuPay transaction volume by the end of the tournament. 🚀 Don’t forget to: ✅ Register your team: link ✅ Transact with GuPay before July 15 ✅ Watch the leaderboard change in real-time From football fields to financial freedom — this is Web3 in action, where fans aren’t just cheering, they’re shaping the outcome. ✋ 🏁 2 weeks left. One winner. Will it be your team? #GuPayTeamCup#GuMinigame#FIFAClubWorldCup2025

Gumart Announcement 🛒

@gumartec · Post #269 · 13.06.2025 г., 07:56

🏆 GuPay Team Cup – The Race Is On! ⚽️ Just 3 days in, and over 2,000 Gumart residents have jumped into the GuPay Team Cup – 2025 FIFA Club World Cup Edition!🚀 🔥 The leaderboard is heating up: 1️⃣ Real Madrid is leading the charge 2️⃣ Chelsea right behind 3️⃣ Manchester City chasing hard! Want your team to rise? 💥 👉 Every GuPay transaction boosts your team’s score and brings you closer to the $5,000 prize pool! 📍Choose your team now and start transacting: link #GuPayTeamCup#GuGiveaway#FIFAClubWorldCup

Gumart Announcement 🛒

@gumartec · Post #276 · 02.07.2025 г., 11:03

‼10,000+ TRANSACTIONS IN 20 DAYS 🤑 GuPay Team Cup – FIFA Club World Cup 2025 is going global - and it’s powered by BNB Chain ⚡️ From Real Madrid to Man City, 32 legendary football clubs are battling it out. But this time, it's not just on the field — it's on-chain. 🏟 📣 Gumart is rewriting what mass adoption looks like: 10,000+ real-world transactions made through GuPay across hotels, stores, and events — all in less than 3 weeks.⬆️ 🚀 Built on BNB Chain's trusted infrastructure, Gumart is leading the charge in making crypto usable, visible, and impactful in everyday life. ➖Want to join? Pick your team and make transactions with GuPay. Help your squad rise to the top. 🌐 Be where culture, payments, and crypto collide. #GuPayTeamCup#Gumart#BNBChain