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

Резултати

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

Пребарај: #bounty

当前筛选 #bounty清除筛选
AIRDROPS BOSS

@airdropsboss · Post #442 · 01.12.2020 г., 17:34

🚀BeforeCoinMarketCap Team is pleased to announce the first AIRDROP of BCMC1 Token 🚀 🏆 Reward for #Airdrop: 2,000 BCMC1 ($20) ➕ 250 BCMC1 ($2,5) ref ➕ 200 BCMC1 ($2) send announce 🏆 Reward for #Bounty: Up to 35,000 BCMC1 (~$350) 🔛 Airdrop Google Form for BeforeCoinMarketCap 🌐OFFICIAL CHANNELS: Telegram Twitter Facebook Instagram LinkedIn YouTube Website: beforecoinmarketcap.com

AIRDROPS BOSS

@airdropsboss · Post #441 · 01.12.2020 г., 15:53

BeforeCoinMarketCap 💰 Reward for #Airdrop: 2,000 BCMC1 ($20) ➕ 250 BCMC1 ($2,5) ref ➕ 200 BCMC1 ($2) send announce 💰 Reward for #Bounty: Up to 35,000 BCMC1 (~$350) 🖥 Fill the form: https://docs.google.com/forms/d/1MbhzJpK1ikAWitHHjnekfrKY3ZQ8_Y147nCqqEqtjq4/edit ☝🏻Join the telegram chat ☝🏻 Follow our twitter page and retweet the pinned post. BeforeCoinMarketCap is a platform for tracking initial placement of tokens, and audit of valid tokens with small volume. Our platform rewards users of valuable information and tokens of own ecosystem tokens. Visit beforecoinmarketcap.com for more details

AIRDROPS BOSS

@airdropsboss · Post #438 · 30.11.2020 г., 17:06

🚀BeforeCoinMarketCap Team is pleased to announce the first AIRDROP of BCMC1 Token 🚀 🏆 Reward for #Airdrop: 2,000 BCMC1 ($20) ➕ 250 BCMC1 ($2,5) ref ➕ 200 BCMC1 ($2) send announce 🏆 Reward for #Bounty: Up to 35,000 BCMC1 (~$350) 🔛 Airdrop Google Form for BeforeCoinMarketCap 🌐OFFICIAL CHANNELS: Telegram Twitter Facebook Instagram LinkedIn YouTube Website: beforecoinmarketcap.com

Psy Poker

@psypokerinfo · Post #2246 · 03.12.2025 г., 21:16

Ще одна) Той самий турік та ж стадія, стартові ноки за опів #HRC #Bounty

Hashtags

Psy Poker

@psypokerinfo · Post #2245 · 03.12.2025 г., 20:58

Сидів розбирав 55 білдер і захотілось однією з роздач поділитись. Стадія 1200 з 2500 за опонентів стартові ноки #HRC #Bounty

Hashtags

Immunefi

@immunefi · Post #453 · 07.06.2022 г., 17:18

SIX MILLION DOLLAR payout just went to the whitehat named pwning.eth for finding a critical vulnerability in Aurora, making it the second-largest #bounty on record 👏🏼 No user funds were lost, and #Aurora quickly patched the bug, leading to a positive outcome for everyone 🎉 Read our #Bugfix Review ⬇️ https://medium.com/immunefi/aurora-infinite-spend-bugfix-review-6m-payout-e635d24273d

Airdrop Strikers™

@airdropstrikers · Post #1169 · 05.04.2023 г., 04:54

A112 Exclusive Giveaway Campaign🚀🚀🚀 Prize: $1,000 #USDT 💰 200 random: $5/each Tasks: 🔹 Follow Twitter: https://twitter.com/a112_metrics 🔹 Subscribe TG: https://t.me/a112_metrics 🔹 Like, RT & Tag 3 Friends on twitter post 👉Complete form: https://docs.google.com/forms/d/e/1FAIpQLSeQOXabK9dJqT-LxHHesxx74reg2F_pCh7GywnxTQfRumMHhA/viewform 📷Winner list & distribution: within 10 days #Airdrop#Giveaway#Bounty#earnfreetoken

AIRDROPS BOSS

@airdropsboss · Post #852 · 25.12.2021 г., 13:59

To the beautiful and wonderful BeforeCoinMarketCap Community! Sincerest wishes for health, happiness, and peace during this Holidays season and throughout the coming year! We thank you all for your unlimited contribution. We hope you stay with us, there are many interesting things this coming year! Let the spirit of love gently fill our hearts and homes. In this loveliest of seasons may you find many reasons for happiness. From all of us at BeforeCoinMarketCap. 💝 #BCMC1#BeforeCoinMarketCap#Crypto#BCMCToken#Airdrop#Bounty

AIRDROPS BOSS

@airdropsboss · Post #854 · 31.12.2021 г., 10:57

💧BeforeCoinMarketCap BOUNTY💧 (For 100 participants only💯) Make a video about our platform: Post it on your official YouTube channel (3-5 minutes) $50 - $100 in BCMC1 token. We take into account the length and quality of the content. Example: Please watch this videos for instructions: https://youtu.be/8t1ucZFnyL8 & https://youtu.be/aYrpgGpI074 1 Best video will receive 15,000BCMC1 ($200) and will posted on our social channels.🏆 Mandatory: ✅Describe the People IEO. (Community voting) ✅Describe the People IEO. (Participant projects) ✅Explain the MLM system (Ongoing token sales) ❗️Notice: The channel must have Minimum of 1000 subscribers. Your email will be blacklisted if you submit an old video link or if you do not follow the instructions given. #BCMC1#BeforeCoinMarketCap#BCMC#Crypto#BCMCToken#bounty#Bounty

AIRDROPS BOSS

@airdropsboss · Post #829 · 13.11.2021 г., 08:32

💎 BeforeCoinMarketCap New BOUNTY 💎 For 100 participants only💯 Bounty Tasks✅ Make a video about our platform: Post it on your official YouTube channel (3-5 minutes) $50 - $100 in BCMC1 token. We take into account the length and quality of the content. 📍Mandatory: 1. Describe the search window. 2. Describe the Announcement window 3. Explain the MLM system (Ongoing token sales): 4. Describe the promotion website Best video will receive 20,000BCMC1 ($300) and will posted on our social channels. 📍Bounty Google Form Notice: The channel must have Minimum of 1000 subscribers. Your email will be blacklisted if you submit an old video link or if you do not follow the instructions given. #BCMC1#BeforeCoinMarketCap#BCMC#Crypto#BCMCToken#Bounty

GitHub Trends

@githubtrending · Post #14877 · 28.06.2025 г., 13:30

#python#bounty#bugbounty#bypass#cheatsheet#enumeration#hacking#hacktoberfest#methodology#payload#payloads#penetration_testing#pentest#privilege_escalation#redteam#security#vulnerability#web_application Payloads All The Things is a comprehensive collection of useful payloads and bypass techniques for web application security testing and penetration testing. It offers detailed documentation for each vulnerability, including how to exploit it and ready-to-use payloads, plus files for tools like Burp Intruder. You can contribute your own payloads or improvements, making it a collaborative resource. It also links to related projects for internal network and hardware pentesting, and provides learning resources like books and videos. Using this resource helps you efficiently find and test security weaknesses in web applications, improving your pentesting effectiveness and knowledge. https://github.com/swisskyrepo/PayloadsAllTheThings