PRO_PYTHON_CODE Telegram 1244
🐍 #Python Совет: Упростите свой код, используя кортеж в str.startswith() 🚀

Знаете ли вы, что в качестве аргумента в методе startswith() можно использовать кортеж строк?

Посмотрите на простой рефакторинг на картинке. Всего одна строка позволяет проверить наличие нескольких префиксов. 🌟

@pro_python_code



tgoop.com/pro_python_code/1244
Create:
Last Update:

🐍 #Python Совет: Упростите свой код, используя кортеж в str.startswith() 🚀

Знаете ли вы, что в качестве аргумента в методе startswith() можно использовать кортеж строк?

Посмотрите на простой рефакторинг на картинке. Всего одна строка позволяет проверить наличие нескольких префиксов. 🌟

@pro_python_code

BY Python RU




Share with your friend now:
tgoop.com/pro_python_code/1244

View MORE
Open in Telegram


Telegram News

Date: |

Private channels are only accessible to subscribers and don’t appear in public searches. To join a private channel, you need to receive a link from the owner (administrator). A private channel is an excellent solution for companies and teams. You can also use this type of channel to write down personal notes, reflections, etc. By the way, you can make your private channel public at any moment. In 2018, Telegram’s audience reached 200 million people, with 500,000 new users joining the messenger every day. It was launched for iOS on 14 August 2013 and Android on 20 October 2013. Judge Hui described Ng as inciting others to “commit a massacre” with three posts teaching people to make “toxic chlorine gas bombs,” target police stations, police quarters and the city’s metro stations. This offence was “rather serious,” the court said. Informative How to Create a Private or Public Channel on Telegram?
from us


Telegram Python RU
FROM American