TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #22 · 19 јан.

Заметка начинающим, которые часто сталкиваются с подобной непоняткой. Ситуация следующая, есть список файлов: names = [ 'image.bmp', 'second.txt.bkp', 'data.db', '.config.cfg', 'file.ext.bkp' ] И мы хотим убрать у них окончание ".bkp". Не знаю зачем, пример довольно надуманный) Но суть он показывает, а это главное. Те, кто еще не очень знаком с библиотекой os.path или pathlib, вероятно решат обработать имена как строки. И тут вполне подойдет метод строки strip(). Что делает этот метод? Он отрезает указанные символы по обеим сторонам строки. Если ничего не указать, то убирает невидимые символы (пробелы, табуляции и переносы строк). В нашем случае будет выглядеть вот так: >>> name.strip('.bkp') То есть просим удалить строку '.bkp' по краям имени файла, если таковая есть. Можно применить аналогичный метод rstrip(), чтобы отрезать только справа, но для этого примера используем обычный. >>> for name in names: >>> print(name.strip('.bkp')) image.bm second.txt data.d config.cfg file.ext Хм, что-то не то с нашими именами! Что случилось??? Видим нежелательное переименование в именах, где и близко не было указанной строки '.bkp' А дело всё в том, что данный метод ищет не указанную строку, а указанные символы, и не важно в каком порядке. Для метода strip() строка '.bkp' это не паттерн для поискаа список символов. Потому он отрезал симовол 'p' от '.bmp' и удалил точку из файла '.config.cfg'. Как тогда правильно заменить именно паттерн? Для начинающего можно посоветовать метод строки replace(), который как раз использует для замены указанную строку целиком. В нашем примере заменим её на пустую строку. >>> for name in names: >>> print(name.replace('.bkp', '')) image.bmp second.txt data.db .config.cfg file.ext Уже лучше, но помните, это лишь пример про strip(). Для работы с именами файлов есть способы и более "правильные", дающие однозначно верный результат. Я взял файлы только в качестве примера. Даже replase() тут может сделать не то что ожидаем. Просто впредь будьте внимательны с этим strip(). #basic

Hashtags

Резултати

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

Пребарај: #snx

当前筛选 #snx清除筛选
Coin Sonar

@CoinSonar · Post #243517 · 17.04.2026 г., 07:49

#SNX | Volume spike (USDT PAIR) 67 times the average volume 107.06K USDT traded in 5 min └Selling vol: 69.96K USDT 🔴 Boost score: 1/10 24h Vol: 457.26K USDT (Binance) Price: 0.307 (-2.0% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28350 · 20.12.2024 г., 08:39

#SNX/USDT analysis : #SNX is currently retracing towards the support zone following a recent impulsive move. It is anticipated that after a breakout from this zone, the price will retest and subsequently bounce back, resuming its bullish momentum. TF : 1D Entry : $2.0 Target : $3.4 SL : $1.5

Hashtags

Pro Analysis

@proanalysistrader · Post #27938 · 16.09.2024 г., 14:02

#SNX/USDT analysis : #SNX has broken and retested the support zone, and it is currently facing resistance from the 200 EMA. The price is likely to continue its bearish momentum from its current level and retest previous lows. TF : 4H Entry : $1.353 Target : $1.229 SL : $1.430

Hashtags

American Crypto©

@americancryptotrading · Post #27461 · 06.12.2025 г., 10:17

🇺🇸#SNX/USDT is consolidating near the lowerborder of the descendingchannel on the weekly chart👀 Time to go long🐃 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27429 · 05.11.2025 г., 09:26

🇺🇸#SNX/USDT is currently shaping the descendingchannel on the weekly timeframe💁‍♂️ Recovery is on the way✈️ American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27251 · 16.05.2025 г., 10:54

🇺🇸#SNX/USDT is about to break through the descendingchannel pattern on the daily timeframe🧐 Breakout is on the way🐃 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27152 · 12.02.2025 г., 16:43

🇺🇸#SNX/USDT is facing the lowerborder of the falling wedge pattern on the weekly chart💁‍♂️ Looking for a rise📈 American Crypto©

Hashtags

Coinlegs Cryptocurrency Signals

@coinlegs · Post #9430 · 27.11.2023 г., 08:43

#SNX🐻👀 A little bit risky but will worth to try. Use SL. Want to see more strategies for any coin? Check out CoinLegs in order to have an overview before your trades 📊

Hashtags

Alphavave Traders ️️️

@alphavave · Post #2992 · 09.11.2025 г., 07:01

UNBELIEVABLE PROFIT OF 23,600% HAS BEEN REALIZED IN #SNX 🔀 We're made a massive 2️⃣3️⃣6️⃣🔤 profit this Trade 🤑🔥 If you had only $50 inthis single position you would've made $11,800⭐ Went from 7,910% to 23,615%—That’s an extra 15,705% profit just by holding for maximum gains🥂🔥 If you're someone who's been following our progress, but haven't yet joined the PREMIUM group, what's holding you back? You can see the consistent profits we're making on a regular basis. The only difference between you and the members who send us the positive feedback you see, is that they took action and joined the PREMIUM group. It's business as usual - every day, like clockwork, we are in the fast lane, leaving the competition eating our dust 😮‍💨🪙 If you are ready to step up, send me a message and let's get started 👇 @Kevindexter✅

Hashtags

Alphavave Traders ️️️

@alphavave · Post #2776 · 02.09.2025 г., 12:21

🔀#SNX/USDT 2,170% profit, insane move! 🤯 That’s 2️⃣1️⃣🔤 gain on your money 💰🔥 💰$50 would return $3600💸 💰$50 would return $1,085💎 💰$50 would return $1,085💎 Fast & solid results—that’s what we love the most. Any guesses on who’s missing out again? 🤔 Enjoy 2,170% profit🆙. 🤝Congratulations all Premium Members. Now imagine if you followed the rest of the signals.. 🤑💯 chat to join ➡️@Kevindexter✅️

Hashtags

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