TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #254 · 11 јун.

Тип строки в Python имеет очень много удобных методов. Сегодня пост про два таких метода которые чаще всего используются "однобоко". Это методы startswith() и endswith() Самый обычный сценарий использования — проверка, начинается ли строка с указанной подстроки? >>> "some_string".startswith("some") True И аналогичная ситуация с зеркальным вариантом этой функции, проверка совпадения с конца >>> "some_string".endswith("some") False Так они используются в большинстве случаев что я видел. Но у этих функций есть еще два варианта использования. 🔸Сравнение нескольких подстрок Для проверки нескольких подстрок в одной строке обычно вызывают эти функции несколько раз. Но на самом деле достаточно передать кортеж со всеми строками один раз. Если будет хоть одно совпадение то функция вернёт True. >>>"my_image.png".endswith(("jpg", "png", "exr")) True 🔸Диапазон поиска Вторым аргументом можно передать индекс символа с которого следует начать сравнение, а третий аргумент это индекс последнего символа. >>> ".filename.ext".startswith("file", 1) True >>> "file_###.ext".endswith('#', 0, -4) True Индексы можно указать отрицательными, что означает отсчёт с конца. #trics#basic

Hashtags

Резултати

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

Пребарај: #efficient

当前筛选 #efficient清除筛选
DWF Labs Broadcast

@DWFLabs · Post #224 · 20.02.2023 г., 09:02

In our latest episode of DWF Chats, we hosted Michael Norton, the Global Community Manager of Solve.Care! In this interview, we discussed Solve.Care's use of the blockchain to create a more #efficient and effective healthcare system, and how this platform can reduce costs and improve patient #outcomes. We're proud to support the work towards the decentralization of #healthcare through Solve.Care's #innovation in this space. Don't miss this conversation here. // About Solve.Care: ▫️Solve.Care is a healthcare relationship management platform using blockchain to define the next generation of care coordination, benefit administration and payments. Visit https://solve.care/ to find out more.

Venture Village Wall 🦄

@venturevillagewall · Post #3360 · 18.12.2024 г., 12:07

Gander Raises $500K for AI Solutions Gander has secured a funding round of $500K, announced for December 4, 2024. The company focuses on assisting airlines in creating flexible, AI-powered workflows that enable customers to request reimbursements and compensation efficiently. #Funding#AI#Airlines#Reimbursement#Compensation#Workflows#Finance#Tech#Innovation#CustomerService#Gander#Investment#Startup#Digital#Support#Flexibility#Solutions#Technology#Efficient#CustomerExperience