@cursosgratismega · Post #798 · 08.06.2022 г., 22:07
Problemas de arranque | #Users
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
Пребарај: #users
@cursosgratismega · Post #798 · 08.06.2022 г., 22:07
Problemas de arranque | #Users
Hashtags
@cursosgratismega · Post #772 · 22.05.2022 г., 16:17
Programación desde cero | #Users
Hashtags
@cursosgratismega · Post #675 · 03.02.2022 г., 14:05
Administrador de Redes Windows | #Users
Hashtags
@native_fi · Post #114 · 05.09.2025 г., 04:42
#Users who's withdrawals are stuck on Pending Steps to complete it are DM : @gBuidl or Mail : [email protected] Share your UID, amount and token withdrawn and the tx hash to the support chat Once your withdrawal is successfully processed you'll receive an update from our support team under your ticket about your successful withdrawal Rest assured your funds are safe, and these reviews have been places to ensure the safety of your funds. Thank you for your patience while we process the high withdrawal requests received from over night
Hashtags
@NEWS_AND_TIPS · Post #2600 · 22.07.2024 г., 17:27
Telegram reached 950 million monthly users (900 Million) Source : 💌💌💌 & 💌💌💌 #950million#Users#Telegram
Hashtags
@SpEcHlDe · Post #947 · 05.01.2020 г., 13:54
#telegram#bots#users#edit#delete#restriction#limits
@venturevillagewall · Post #3826 · 09.01.2025 г., 04:00
Binance Hits 250M Users, Record Stats Binance reports over 250 million registered users by year's end, a 47% increase. Platform processed 4.44M requests/second; VIP users up 116%, institutional users up 97%. Internal compliance team expanded to 650 experts. Read more US government clear to liquidate 69,000 Bitcoins (valued at $6.5B) seized from Silk Road. This follows a promise by the new administration not to sell the Bitcoins. Read more #Binance#Bitcoin#Crypto#Users#VIP#Institutional#Compliance#SilkRoad#Seizure#Finance#USGovernment#AnnualReport#MarketCap#Trading#Blockchain#Investments#Tech#DigitalCurrency#News
@venturevillagewall · Post #3745 · 29.12.2024 г., 16:00
Blum's Controversial Update Sparks Backlash Blum's recent announcement regarding its new point system has raised eyebrows among users, seen as devaluing months of effort. Critics argue that this move reflects a greed-driven strategy rather than rewarding loyal users. The absence of referral incentives further fuels dissatisfaction, with many questioning Blum's leadership approach. Some believe that this misstep may jeopardize future user trust if the token drop lacks transparency and fairness. For more details, read the full analysis here: TonUP_SRP and check the discussed token drop implications: Bybit. #Blum#Crypto#VC#TokenDrop#Loyalty#Referral#Sustainability#Users#Growth#Feedback#Strategy#Leadership#Earnings#Finance#Investing#WhaleAlert#BTC
@venturevillagewall · Post #3402 · 18.12.2024 г., 12:10
Dfns Secures $16M Funding Dfns, the wallet-as-a-service (WaaS) platform, has raised $16 million in funding as of December 18, 2024. The platform is designed to simplify digital asset operations and facilitate safe crypto onboarding for leading organizations. #Dfns#Funding#WaaS#DigitalAssets#Crypto#Operations#Onboarding#Investment#Security#Technology#Finance#Blockchain#Startups#Innovation#Market#Users#Ecosystem#Wallet#Services#Platform#Growth
@venturevillagewall · Post #3987 · 26.01.2025 г., 04:00
Coinbase Considers New Listing Strategy Brian Armstrong mentions that Coinbase is exploring a shift to a democratized listing style, favoring a 'block list' approach over an 'allow list'. Additionally, as of November 2024, Indonesia reports 22.1 million registered cryptocurrency users, with USDT, BTC, DOGE, PEPE, and XRP being the most traded. More details can be found in the report by Wu Blockchain here. #Coinbase#Crypto#Indonesia#USDT#BTC#DOGE#PEPE#XRP#Blockchain#MarketData#Trading#Users#Statistics#Listing#Democratized#Finance#Trends #2024 #Innovation#VC#AI
@botsgram_cu · Post #3169 · 25.11.2020 г., 16:40
@channely_bot Qué puede hacer este bot? Este bot es el mejor asistente para la gestión de canales en Telegram. Conecto los canales al servicio principal. ¡Incluyendo un rico entorno webUI de edición! https://app.channely.co/ Idioma: Inglés (visto en @BotsGram.cu) #canales, #canal, #gestión, # administración, #richeditor, #posts, #schedule, #polls, #comment, #commenting, #reactions, #editor, #share, #buttons, #webui, #subscribe, #stats, #users, #trial, #limited, #proaccount
@venturevillagewall · Post #3590 · 20.12.2024 г., 12:23
Google's Growth Dilemma Revealed Google faces a challenge with 5.5 billion users searching three times daily, leading to a near 98% penetration of its services. The company's pressure to show growth for investors may have led to risky strategies, including diversifying user journeys to boost commercial queries. A leaked document outlines these changes aimed at enhancing growth beyond organic metrics. Find out more in our podcast: Кухня. 📈 Listen here: Кухня Podcast For the full leaked document: Leaked Document #Google#Search#Users#Growth#Investment#Penetration#CommercialQueries#Tech#Strategy#Marketing#DocumentLeak#Podcast#DigitalMarketing#UserJourney#Innovation#Business#Alphabet#TechCulture#Earnings#MarketTrends