@sgmrt · Post #1692 · 07.04.2023 г., 06:47
[CCL]: If you are at #Promenade, #Bayfront or #MarinaBay, you may take the TEL, DTL, or alternative modes of transport. Free regular bus and free bridging bus services are still available. - SMRT
Hashtags
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
Пребарај: #bayfront
@sgmrt · Post #1692 · 07.04.2023 г., 06:47
[CCL]: If you are at #Promenade, #Bayfront or #MarinaBay, you may take the TEL, DTL, or alternative modes of transport. Free regular bus and free bridging bus services are still available. - SMRT
Hashtags
@sgmrt · Post #1467 · 20.06.2022 г., 05:58
[CCL] UPDATE: Shuttle train service is available #Bayfront & #MarinaBay at Platform B. Passengers are advised to use DTL to continue their journey between #Bayfront and #Promenade. - SMRT
Hashtags
@sgmrt · Post #1466 · 20.06.2022 г., 05:43
[CCL]: Due to a track fault, additional 10 mins travelling time between #Promenade & #MarinaBay. Shuttle train service is available #Bayfront & #MarinaBay at Platform B. Passengers are advised to use DTL to continue their journey between #Bayfront and #Promenade. - SMRT
Hashtags
@sgmrt · Post #1690 · 07.04.2023 г., 06:15
[CCL]: Pls add 40mins of train travel time between #DhobyGhaut/#MarinaBay and #Stadium. Commuters are advised to take other lines such as DTL, NSL and NEL if you are at #DhobyGhaut, #MarinaBay, #Promenade or #Bayfront. Free regular bus and free bus bridging svcs are available. - SMRT
@sgmrt · Post #1740 · 23.06.2023 г., 15:33
[CCL] UPDATE: No train service between #Esplanade / #Bayfront and #Mountbatten. Additional 30 minutes between #DhobyGhaut and #Esplanade, #MarinaBay and #Bayfront, and #Mountbatten and #PayaLebar. Please use alternative means of transport to continue your journey. - SMRT
@sgmrt · Post #1738 · 23.06.2023 г., 14:58
[CCL] UPDATE : No train service between #Esplanade / #Bayfront and #Mountbatten. Additional 30 minutes between #DhobyGhaut and #Esplanade, #MarinaBay and #Bayfront, and #Mountbatten and #PayaLebar. - SMRT
@sgmrt · Post #2469 · 01.09.2025 г., 00:49
[CCL] UPDATE: Passengers travelling towards #MarinaBay, please transfer at #DhobyGhaut or #Bishan for the North-South Line, or #Caldecott for the Thomson-East Coast Line. Passengers travelling towards #Bayfront, please transfer at #Promenade or #MacPherson for the Downtown Line. - SMRT