@cryptocurreniesbtc · Post #22119 · 11.11.2023 г., 12:14
#Altcoin season is arround the corner.
Hashtags
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
Пребарај: #altcoin
@cryptocurreniesbtc · Post #22119 · 11.11.2023 г., 12:14
#Altcoin season is arround the corner.
Hashtags
@CryptoAustralia · Post #14735 · 14.12.2023 г., 08:57
I think #Altcoin season is next. By Crypto Australia
Hashtags
@elfcryptovip · Post #11747 · 21.07.2025 г., 07:45
The #Altcoin Season Index is climbing rapidly, but only a handful of coins are seeing strong gains!
Hashtags
@michaelvandepoppeanalyst · Post #4797 · 09.09.2024 г., 18:29
The boring state is the period of accumulation before a new push happens. That’s the current state of the #Altcoin markets.
Hashtags
@michaelvandepoppeanalyst · Post #4780 · 07.09.2024 г., 08:12
The #Altcoin market capitalization valued in Bitcoin is at the highest level since the end of July. Good perspectives, and it's a pretty substantial breakout. Better times are ahead.
Hashtags
@michaelvandepoppeanalyst · Post #4768 · 05.09.2024 г., 16:43
The #Altcoin markets are reversing. I'm positioned into $OMNI (and under-water), but it's showing a: - Daily bullish divergence. - Reclaiming the level of early August. Expect to see a run of 2-3x in the coming 2-3 months against $BTC value --> the most important metric.
Hashtags
@michaelvandepoppeanalyst · Post #4694 · 31.08.2024 г., 15:48
The #Altcoin market capitalization, valued in Bitcoin, is still consolidating. We're in the middle of that bottoming process, but it's taking a long time. Expecting to see a significant run towards new highs once this starts to turn around.
Hashtags
@michaelvandepoppeanalyst · Post #4605 · 24.08.2024 г., 08:01
Valid falling wedge and bullish divergence on the #Altcoin market capitalization divided by Bitcoin. I think we’re in for a great final part of this year. https://x.com/CryptoMichNL/status/1827254521225162944?t=CykS0U09CC0XSGUvztSAHw&s=19
Hashtags
@michaelvandepoppeanalyst · Post #4510 · 17.08.2024 г., 13:41
The Others market capitalization, which is technically the #Altcoin market capitalization, is currently acting at the low of 'Disbelief'.
Hashtags
@michaelvandepoppeanalyst · Post #4451 · 11.08.2024 г., 15:38
The #Altcoin market capitalization is down 60% from the ATH, while Bitcoin is only down 15%. Lots of upside for altcoins still to come.
Hashtags
@michaelvandepoppeanalyst · Post #4379 · 03.08.2024 г., 13:00
The #Altcoin market capitalization is not showing anything massive, yet. Smaller altcoins have been collapsing. The bigger ones still stand, through which this can be seen as a relatively normal consolidation for the entire index. Reversals should come in the coming weeks.
Hashtags
@michaelvandepoppeanalyst · Post #4244 · 20.07.2024 г., 14:05
The total #Altcoin market capitalization has bottomed during the release of the Mt. Gox news. A strong upward bounce, but more importantly, a strong reversal since it tested a higher timeframe support. https://x.com/CryptoMichNL/status/1814661548193034620?t=tmCmHJhGfr0c38lQIfYUfg&s=19
Hashtags