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

Резултати

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

Пребарај: #raff

当前筛选 #raff清除筛选

TONCO fine-tuning pools feature and collab with Tonstakers 🌱Advanced Range Presets – users and projects can now customize their liquidity strategies with ready-made range presets tailored to the market and different needs. Advanced presets are available for pools paired with $USDT or $TON. 🍀 Each preset serves different goals, whether you’re a user looking to maximize earnings or a project launching a token on #TONCO. There’s no single “best” strategy – performance depends on market conditions and how actively you manage your position. 🍃 Below we will show each of the presets in short way, but you can read more in the guide from the TONCO team: 🟢Curve – a balanced exposure, best for low volatility period, stable pairs or key price levels in volatile pairs. 🟢DCA Buy / DCA Sell – perfect for buying or selling assets over time while earning fees. 🟢Buy Walls / Sell Walls – price protection and market depth, used to stabilize price movements and create resistance/support levels. 🟢Steps – controlled price progression, gradually increases price levels to manage early-stage price growth while preventing sudden surges. ❗️Be careful with risks. Advanced strategies can increase yield, but also require active management. DYOR before deploying liquidity. 🤩 TONCO DEX announced a partnership with Tonstakers – $tsTON has been officially added to the exchange. TONCO's liquidity provision in the $stTON / $USDT pair is now 10 times greater than on classic V2 exchanges, and is about 25%. Plus, additional accruals are currently underway rewards for farming in this pair. 🔥Also 2 new pools with TON old token #RAFFwere added. But the juice is still in the TON/USDT pair, where APR reaches 80%. TONCO | Channel | Chat

Hashtags

Пример фармилки жетонов в сети TON. Это пока единственное место куда я закинул свои жетоны #SCALE в стек. Шаг 1. Свапнуть #TON на #SCALE. https://dedust.io/swap Шаг 2. Добавить в стек #SCALE. https://tonraffles.app/jetton/staking Таким образом можно 14 дней фармить жетон #RAFF. APR: 1000% на текущий момент. Не финансовый совет. Риски есть, гарантий нет.

Bidask: $RAFF & $WEB3 Listings, MyTonWallet & DeWallet Integration + Meme Contest 🏴Two new tokens are now live on Bidask: • $RAFF — from the Ton Raffles ecosystem • $WEB3 — from the .ton domain ecosystem Both are now tradable in pairs against #TON. The WEB3/TON pool features boosted farming through August 5, with up to ~44% APR — rewards in $WEB3 scale based on daily trading volume: ➖ $12.5/day if volume > $10,000 ➖ $25/day if volume > $15,000 ➖ $37.5/day if volume > $18,000 ➖ $50/day if volume > $20,000 ➖ $67.5/day if volume > $23,000 ➖ $75/day if volume > $25,000 🏆Bidask Meme Contest Create a meme about Bidask Protocol, post it on X (Twitter) with the hashtag #BidaskMemeContest, and share it in the contest thread in the “meme contest thread” in the Bidask chat. Only memes posted in both X and the chat thread will qualify. Contest runs through August 7. Prizes include: 🥇 1st — Toy Bear #52238 🥈 2nd — Record Player #10315 🥉 3rd — Crystal Ball #3932 🏅 4th — Light Sword #7136 🏅 5th — Light Sword #72658 👛 Wallet Integrations #MyTonWallet and DeWallet (by DFC ecosystem) have added Bidask DEX support — making it even easier to swap and farm. 📈 Top APRs on Bidask DEX right now: • HYDRA/TON — ~1250% APR • TON/USDT — ~87% APR Bidask DEX |Channel #Bidask#WEB3#RAFF#DeFi#YieldFarming#CryptoNews#CryptoTrading#TON#TONBlockchain#DEX