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

Резултати

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

Пребарај: #staking

当前筛选 #staking清除筛选
TONlines – News

@tonlines · Post #6934 · 28.04.2025 г., 09:08

⚡️Gatto Official Channel: April $GTON Staking Rewards Announced #$GTON #staking Gatto Official Channel has completed the April $GTON staking. Participants have received various rewards including Duckzills and gattoboxes. Long-term token retention awards are also being given for the first time, with new staking starting May 1. Source: link @tonlines

Hashtags

TONlines – News

@tonlines · Post #7675 · 02.12.2025 г., 06:41

⚡️Hipo: Maximize Your Staking Rewards with TON and HPO #TON#staking Hipo offers one of the highest staking reward rates in the TON ecosystem, allowing users to earn both TON and HPO. The dual reward system enhances long-term value for HPO holders and strengthens Hipo’s TVL. Source: link @tonlines

Hashtags

TONlines – News

@tonlines · Post #7293 · 20.05.2025 г., 12:28

bemo | TON Staking Glossary for Beginners and Pros #staking#TON The bemo channel provides a comprehensive glossary on staking in TON, covering essential terms like slashing, LST, APY, and TVL. This resource is perfect for both newcomers and experienced users, with clear explanations and visual aids. Source: link @tonlines

Hashtags

TONlines – News

@tonlines · Post #6801 · 16.04.2025 г., 16:02

EVAA: Leveraged Staking Workshop Tomorrow #TON#staking Join the EVAA workshop tomorrow to learn about leveraged staking, tsTON liquid staking, and how to boost your TON and EVAA XP. The event, hosted by @thetonstakers, promises a beginner-friendly and fun format with real-time interaction. Source: link @tonlines

Hashtags

TONlines – News

@tonlines · Post #7173 · 12.05.2025 г., 13:46

Hipo: Understanding Staking in Crypto #crypto#staking Hipo explores the concept of staking in blockchain networks like TON and Ethereum. The video explains the process of earning rewards through staking, the role of staking pools, and how Hipo enhances security with liquid staking. Source: link @tonlines

🎙Huge potential Staking announcement 👉Investors, those who was interested in staking UpOnly has announced the launch of a new $UPO Staking Round on August 19th 🔥🔥 UpOnly will start a new staking round for $UPO holders on August 19th, at 12:00 UTC. Investors can stake for 30 days, 60 days, or 90 days, with differing returns between 15%-25% APR. Investors can start staking $UPO in the newly opened staking portal today. UpOnly has lowered the staking threshold to as little as 1 UPO. ⏰ 30 days, 60 days, or 90 days staking 🥇 Returns between 15%-25% APR Lets go💥 👉More info: uponlyofficial.substack.com/p/uponly-launches-new-upo-staking-round 👉 Website: https://www.uponly.com/ #staking#promotion

TONlines – News

@tonlines · Post #6843 · 18.04.2025 г., 16:54

Bemo: The Advantage of Liquid Staking #staking#DeFi Bemo introduces liquid staking with bmTON, allowing users to earn rewards while maintaining asset accessibility. This approach integrates seamlessly with TON DeFi and provides strategic benefits for active portfolio managers and yield farmers. Source: link @tonlines

TONlines – News

@tonlines · Post #7648 · 29.11.2025 г., 12:12

Gatto | Official Channel Staking Update for December #staking#GTON Gatto | Official Channel announces a staking event in December for $GTON token holders. Participants can earn various rewards, including exclusive prizes and in-game items, by holding tokens from December 1st to 29th. Source: link @tonlines

TONlines – News

@tonlines · Post #7647 · 29.11.2025 г., 12:12

Gatto: December Staking Rewards Begin December 1 #staking#GTON Gatto | Official Channel announces a new staking initiative for $GTON, starting on December 1 and running until December 29. Participants will be rewarded with various prizes, including game items and tokens, depending on their stake tier. Source: link @tonlines

TONlines – News

@tonlines · Post #7642 · 28.11.2025 г., 15:33

Gatto | Official Channel: November $GTON Staking Completion #staking#GTON The Gatto | Official Channel successfully concluded the November $GTON staking event. Participants maintained their tokens on game balances and earned rewards like gold coins and gattoboxes. The next staking begins on December 1st, with more information on rewards coming soon. Source: link @tonlines

TONlines – News

@tonlines · Post #7436 · 29.05.2025 г., 14:30

Gatto Official Channel: June Staking Rewards for $GTON #GTON#Staking The Gatto Official Channel announces June staking for $GTON, offering substantial rewards for maintaining the token on your game balance. The campaign runs from June 1 to June 30, featuring exclusive prizes not accessible through regular purchase. Source: link @tonlines

TONlines – News

@tonlines · Post #7000 · 01.05.2025 г., 08:01

⚡️Gatto Official Channel: Start of $GTON Staking #GTON#staking Gatto Official Channel announces the beginning of $GTON staking, with the first snapshot scheduled for today at 09:00 UTC. Players are encouraged to top up their game balance and hold $GTON until the end of staking on May 30 to receive rewards. Random balance cuts will occur daily, and details about rules and rewards can be accessed online. Source: link @tonlines

123•••67
ПретходнаСтраница 1 од 7Следна