Telegram Group & Telegram Channel
Удаление префиксов и суффиксов

По какой-то неизведанной причине многие разработчики посчитали эту фичу в обновлении 3.9 не очень интересной и попросту забыли. И зря.

Некоторые на полном серьезе для таких целей до сих пор пытаются использовать забагованные .strip и .lsrtip. Точнее, большинство просто не до конца понимают, как работают эти два метода.

И всё же, в Python 3.9 были добавлены методы для строк .removeprefix и .removesuffix, предназначенные специально для удаления префиксов и суффиксов в строках.

#строки



tg-me.com/python_academy/350
Create:
Last Update:

Удаление префиксов и суффиксов

По какой-то неизведанной причине многие разработчики посчитали эту фичу в обновлении 3.9 не очень интересной и попросту забыли. И зря.

Некоторые на полном серьезе для таких целей до сих пор пытаются использовать забагованные .strip и .lsrtip. Точнее, большинство просто не до конца понимают, как работают эти два метода.

И всё же, в Python 3.9 были добавлены методы для строк .removeprefix и .removesuffix, предназначенные специально для удаления префиксов и суффиксов в строках.

#строки

BY Python Academy




Share with your friend now:
tg-me.com/python_academy/350

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

Telegram Auto-Delete Messages in Any Chat

Some messages aren’t supposed to last forever. There are some Telegram groups and conversations where it’s best if messages are automatically deleted in a day or a week. Here’s how to auto-delete messages in any Telegram chat. You can enable the auto-delete feature on a per-chat basis. It works for both one-on-one conversations and group chats. Previously, you needed to use the Secret Chat feature to automatically delete messages after a set time. At the time of writing, you can choose to automatically delete messages after a day or a week. Telegram starts the timer once they are sent, not after they are read. This won’t affect the messages that were sent before enabling the feature.

Newly uncovered hack campaign in Telegram

The campaign, which security firm Check Point has named Rampant Kitten, comprises two main components, one for Windows and the other for Android. Rampant Kitten’s objective is to steal Telegram messages, passwords, and two-factor authentication codes sent by SMS and then also take screenshots and record sounds within earshot of an infected phone, the researchers said in a post published on Friday.

Python Academy from sa


Telegram Python Academy
FROM USA