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

Резултати

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

Пребарај: #schumannresonance

当前筛选 #schumannresonance清除筛选
My Lifeguard

@lifegaurdhelp · Post #39200 · 11.02.2026 г., 23:56

Schumann Resonance Today – Power 51 & 1 Hr Blackout ✨#SchumannResonance Today 11/2/2026 17:00 UTC https://www.disclosurenews.it/schumann-resonance-today/

🐎 Mustang Debbie Channel🐎

@mustangdebb · Post #47769 · 10.05.2026 г., 00:08

https://x.com/mrmbb333/status/2053139040468418953?s=52 WHILE PEOPLE WERE SLEEPING… EARTH’S FREQUENCY WENT FULL WHITE-OUT AGAIN Overnight, the Schumann Resonance exploded into repeated white-out bursts for more than 5 hours straight. Not one quick spike. Not normal background activity. The chart kept surging, fading, then surging again — staying highly energized deep into the night while most people were asleep. And the amount of white showing across the chart is hard to ignore. Something kept the signal highly charged for hours. Did anyone wake up suddenly last night? • Vivid dreams • Pressure or headaches • Ringing ears • Restless sleep • Electronics acting strange • Pets acting off What are you noticing where you are? #MrMBB333#SchumannResonance#SpaceWeather

Question Everything

@gratefulpatriot · Post #90727 · 20.04.2026 г., 02:17

https://i.fixupx.com/i/status/2045928133946433932 UNKNOWN ACTIVITY SHOWING UP AGAIN IN EARTH’S FREQUENCY For nearly 7 hours, the Schumann Resonance monitor showed sustained saturation across multiple bands. The signal didn’t clear. It stayed compressed across the chart. This isn’t a normal pattern. It follows right behind the last disturbance. Back-to-back activity now. Something is passing through the system. Origin unclear. Monitoring. #MrMBB333#SchumannResonance#SpaceWeather

🐎 Mustang Debbie Channel🐎

@mustangdebb · Post #47912 · 10.05.2026 г., 18:56

https://x.com/mrmbb333/status/2053541044068012078?s=52 SOMETHING KEPT HITTING EARTH’S FREQUENCY TODAY ⚡️ The Schumann Resonance has been showing something difficult to ignore. The graph has been cycling through repeated bursts of intense activity, including multiple sustained whiteout periods and powerful 50 Hz pulses lasting close to an hour at a time. This wasn’t a quick spike and fade. The signal kept returning over and over with very little quiet in between. At several points the chart looked completely overwhelmed before briefly calming… only to surge right back again. The level of prolonged saturation showing up today has been unusual. Anyone else feeling like today has felt unusually heavy, restless, intense, or just “off”? Drop your location below. #MrMBB333#SchumannResonance#EarthWatch#SpaceWeather

🐎 Mustang Debbie Channel🐎

@mustangdebb · Post #48418 · 13.05.2026 г., 17:59

https://x.com/paulgoldeagle/status/2054619457520271823?s=52 🚨 ANOTHER MASSIVE SURGE IN THE EARTH'S FREQUENCY TODAY. 🚨 The Schumann Resonance—the natural electromagnetic heartbeat of our planet—is lighting up the charts again today. We are seeing strong, bright bands of energy blasting through the atmosphere for hours on end. Instead of feeling heavy, today's energy is highly electric. The Schumann Resonance is created by global lightning and electromagnetic waves trapped between the Earth's surface and the edge of space. When this field gets this charged up, a lot of people across the country report feeling it directly in their nervous systems. Here is what people are experiencing right now: • Racing thoughts and mental restlessness • Interrupted sleep and incredibly vivid dreams • Sudden pressure in the head or a "buzzing" feeling in the body • Random bursts of energy followed by quick exhaustion • A feeling like you just can't slow down or relax With all this extra static in the air, your body needs a break to process it. Drink plenty of water, step away from the overstimulation, and get some solid rest to help your system reset and ground itself. Monitoring the electric pulse of our planet here at Glynce. 📡🩵🟣 👇 Are you feeling any of these electric "symptoms" today? Drop what you are experiencing in the comments! #Glynce#SchumannResonance#EarthScience#SpaceWeather#ElectromagneticField#EnergyShift#BreakingNews#Frequency