@danielmkovalik · Post #2636 · 22.07.2025 г., 19:29
Please do understand that none of this would be happening if the heroic Union of Soviet Socialist Republics still stood. #USSR.
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
Пребарај: #ussr
@danielmkovalik · Post #2636 · 22.07.2025 г., 19:29
Please do understand that none of this would be happening if the heroic Union of Soviet Socialist Republics still stood. #USSR.
Hashtags
@danielmkovalik · Post #2187 · 11.04.2025 г., 13:33
Every day I’m reminded how the world is much the worse because of the collapse of the #USSR. Here are several reasons why:
Hashtags
@rtdocumentary · Post #512 · 15.03.2022 г., 10:02
#video#USSR For 872 days, Leningrad was cut off from the outside world. Nazi forces encircled the city, launching the deadliest and longest blockade in history. Within the first few weeks, food supplies were depleted, leading to extreme famine. Glue, cellulose, shoe soles - anything consumable was used as food. About 1.1 million people died during the siege, most of them starved to death. Lidia Sudina and Dmitry Buchkin witnessed air raids, bombardment, and starvation as children. Hear their recollection of the ordeal in our documentary, Leningrad Siege Reflections. Follow: https://t.me/rtdocumentary
@rtdocumentary · Post #440 · 06.02.2022 г., 10:00
The Dyatlov Pass incident is still unsolved #video#USSR On February 1-2, 1959, a group of Soviet hikers died mysteriously in the remote Ural mountains. Their frozen bodies were found scattered hundreds of metres away from their tents. Undressed, their bodies had broken ribs, fractured skulls, burns and scratches. An investigation concluded the group led by Igor Dyatlov was killed by an ‘overwhelming force’, driving some incredible theories. In 2020, the Prosecutor’s Office said an avalanche led to the deaths. Still, many remain sceptical. Check out this video for more details about one of the greatest mysteries of the 20th century. Follow: https://t.me/rtdocumentary
@rtdocumentary · Post #368 · 25.12.2021 г., 10:05
#video#USSR Thirty years ago, Mikhail Gorbachev announced his resignation as Soviet president on state TV. The Soviet flag was lowered for the last time at the Kremlin, and the USSR was no more. In the 1980s, Mikhail Gorbachev launched his flagship policies of Perestroika and Glasnost to transform the country and pull it out of stagnation. Instead, it only worsened the shortages and unleashed a wave of criticism. Gorbachev is widely revered in the West but is often criticised at home for ending the Soviet Union. You can learn more about the dramatic events that unfolded in 1991 before Gorbachev’s resignation speech in our documentary here. Follow: https://t.me/rtdocumentary
@Aetatesolis · Post #4486 · 04.07.2025 г., 16:37
List of bands that were banned from the USSR in 1985 Surprised to not see Metallica on the list. If you have a chance, watch their 1991 performance in Moscow on Youtube (Here). Coming just after the fall of the Soviet Union, the concert drew a crowd estimated between 500,000 and 1.6 million people. With Soviet soldiers standing guard, the crowds of young Russians headbanged to "Enter Sandman" as helicopters fly back and forth from above. Legend has it that people are still leaving the concert... #metal #ussr AETATESOLIS
@semasci · Post #1148 · 25.05.2025 г., 10:34
Взгляд из 1975 в 2025 #СССР#USSR
@learnRCRussian · Post #6136 · 03.02.2026 г., 11:22
Why Children Were Put to Sleep Outside in Winter and Summer. ❄️This practice was widespread in the USSR. Children were put to sleep outdoors, both in winter and summer. ❄️This practice had two main reasons. The first was the perceived benefit. It was believed that sleeping in the open air would help strengthen the immune system, and children would get sick less often. ❄️The second reason was that this тихий час (quiet hour) made the caregivers' work easier, as children fell asleep faster and more soundly in the fresh air, requiring less calming down. ❄️Even in winter, babies slept in the fresh air if the temperature did not drop below -10°C. And some kindergartens, due to the lack of a quiet area near the building, created sleeping spaces right on the roof. ❄️To keep the children warm, special sleeping bags made from sheepskin were sewn for them. In these, the little ones never got cold and slept soundly. ❄️However, parents later had a hard time because at home, the child couldn't fall asleep properly due to the lack of fresh air. So, they had to open all the windows in the house, even if the weather was bad. ❄️It was also believed that such sleep, especially in winter, was an excellent prevention against tuberculosis, which was a very serious problem at the time. Source: Pikabu #brief_and_interesting #USSR 🟠RCR | Support | Boost
Hashtags
@learnRCRussian · Post #5269 · 14.08.2025 г., 14:00
On August 14, 1937, the practice of issuing sick leave certificates was introduced in the USSR, granting the right to partial wage payment if a person was ill and unable to work for a certain period. 🔻The Council of People's Commissars approved the procedure for issuing sick leave certificates, which had been developed by the All-Union Central Council of Trade Unions and the People's Commissariat of Health of the USSR. 🔻The sick leave form itself, also approved in 1937, remained unchanged for a full 57 years. It was only in 2005 that the Ministry of Healthcare and Social Development of the Russian Federation approved its new form – the document changed from bluish to light green, and new security features were added to it. #brief_and_interesting #USSR 😎RCR | Support | Boost
Hashtags
@ikskey · Post #67 · 10.12.2023 г., 18:26
#ussr-chan #es
@learnrcrussian · Post #4024 · 14.01.2025 г., 13:00
Manual how to deal with tough Russians #just_a_joke #USSR 😎RCRussian | Support | Boost
Hashtags
@learnrcrussian · Post #4615 · 01.05.2025 г., 14:00
Did you know that in the USSR there used to be a female newly-invented name 'Даздраперма'? • Даздраперма [da-zdra-per-ma] 🔻It came from a Soviet slogan: • ДА ЗДРАвствует ПЕРвое МАя! Long life the first of May! Photo: 1 May, 1968, Lvov, USSR, Ilya Pavlyuk #USSR #holidays 😎RCRussian | Support | Boost