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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #309 · 2 фев.

Метод строки split() разделяет строку на несколько строк по указанному символу >>> "a_b_c".split('_') ['a', 'b', 'c'] Можно указать максимальное количество разделений >>> "a_b_c".split('_', 1) ['a', 'b_c'] Или резать с другой стороны с помощью rsplit() (right split) >>> "a_b_c".rsplit('_', 1) ['a_b', 'c'] А что будет если оставить аргументы пустыми? >>> "a_b_c".split() ['a_b_c'] Получаем список с одним элементом, потому что по умолчанию используется пробельный символ. >>> "a b c".split() ['a', 'b', 'c'] То есть это равнозначно такому вызову? >>> "a b c".split(" ") ['a', 'b', 'c'] Кажется да, но нет! Давайте попробуем добавить пробелов между буквами >>> "a b c".split(" ") ['a', '', '', 'b', '', '', 'c'] И вот картина уже не так предсказуема 😕 А вот что будет по умолчанию >>> "a b c".split() ['a', 'b', 'c'] Всё снова красиво! 🤩 По умолчанию в качестве разделителя используется любой пробельный символ, будь то табуляция или новая строка. Включая несколько таких символов идущих подряд. А также игнорируются пробельные символы по краям строки. >>> "a\t b\n c ".split() ['a', 'b', 'c'] Аналогичный способ можно собрать с помощью регулярного выражения. Но пробелы по краям строки придется обрабатывать дополнительно. >>> import re >>> re.split(r"\s+", ' a b c '.strip()) ['a', 'b', 'c'] Здесь тоже можно указать количество разделений >>> re.split(r"\s+", 'a b c', 1) ['a', 'b c'] А что если мы хотим написать красиво, то есть split() без аргументов, но при этом указать количество разделений? В этом случае первым аргументом передаём None >>> "a\n b c".split(None, 1) ['a', 'b c'] Данный метод не учитывает строки с пробелами, взятые в кавычки 'a "b c" '.split() ['a', '"b', 'c"'] Но для таких случаев есть другие способы. #tricks#basic

Резултати

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

Пребарај: #trade

当前筛选 #trade清除筛选
Indian Development News 🇮🇳

@developmentnewsindia · Post #44126 · 27.04.2026 г., 14:35

Indian Delegation To Visit Russia For Next Round Of India-EAEU FTA Talks In June 2026 #Trade 🚨India, Russia-Led EAEU Bloc Had Launched Talks For An FTA On 26th November 2025 🚨The EAEU Comprises Of Russia, Kazakhstan, Armenia, Belarus, And Kyrgyzstan; With An Observer Status To Cuba, Moldova, And Uzbekistan

Hashtags

Indian Development News 🇮🇳

@developmentnewsindia · Post #44121 · 27.04.2026 г., 09:15

𝐀 𝐦𝐚𝐬𝐬𝐢𝐯𝐞 𝐰𝐢𝐧 𝐟𝐨𝐫 𝐈𝐧𝐝𝐢𝐚’𝐬 𝐞𝐱𝐩𝐨𝐫𝐭𝐞𝐫𝐬 🇮🇳🤝🇳🇿. The India–New Zealand FTA signed today ensures 100% duty-free access across all tariff lines, eliminating earlier tariffs of up to 10% on textiles, leather, carpets, ceramics, and auto components, boosting competitiveness, cutting costs, and unlocking new markets. #Trade

Hashtags

Indian Development News 🇮🇳

@developmentnewsindia · Post #43413 · 09.04.2026 г., 16:33

Bangladesh to import 200 broad-gauge coaches from India by 2027 The project, financed by the European Investment Bank, is expected to see the coaches added to the Bangladesh Railway fleet between June 2026 and December 2027. #trade

Hashtags

𝐗 𝐀𝐋𝐏𝐇𝐀𝐒

@apksarena · Post #4342 · 19.02.2026 г., 19:57

I’ve been on @Vault777Casino for a while now and it’s honestly one of the most engaging virtual trading platforms I’ve used to #trade Fast predictions, leaderboards, rewards, and real strategy

Hashtags

TONlines – News

@tonlines · Post #7501 · 17.11.2025 г., 16:27

⚡️ Storm Trade: Update Completed and New Features Announced #TON#trade The Storm Trade update has been completed successfully. The platform now uses the Pyth price feed protocol, offering faster and more accurate price updates. This upgrade enhances UI interaction and sets the stage for the upcoming V3 launch on TON. Source: link @tonlines

Hashtags

Indian Development News 🇮🇳

@developmentnewsindia · Post #43850 · 20.04.2026 г., 12:01

🇮🇳🤝🇰🇷 Looking forward to PM Modi visiting South Korea says SK President Lee Jae Myung Indian Officials say an upgraded India-SK CEPA Agreement could be signed during the Visit. 2009 CEPA Agreement reduced Tariffs on 85% Indian Products to SK and 90% SK products to India #Geopolitics#Trade

Trump's Ear

@trumpsear_tg · Post #2107 · 05.02.2026 г., 13:59

Trump sees resumption of trade with Russia as a guarantee of ending the conflict - Foreign Policy In his policy of resolving the conflict in Ukraine, Donald Trump is betting to restore trade relations with Russia as the most important factor of peace. He argues that economic cooperation will benefit American investors and ensure stability in the region. The US administration also believes that trade agreements with Russia, such as energy sector deals, can serve as a guarantor of peace. #Trump#Russia#Trade 👂More on Trump's Ear ⚠️

TONlines – News

@tonlines · Post #7500 · 17.11.2025 г., 16:06

Portals Community: Season 2 Launches with Points Farming #Portals#trade Portals Community announces the return of Points Farming with the launch of Season 2, allowing users to earn points and cashback on every trade. Users can enhance their progress by completing tasks, with more earning opportunities to come. Stay tuned for another major update arriving tomorrow. Source: link @tonlines

123•••101112
ПретходнаСтраница 1 од 12Следна