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

Резултати

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

Пребарај: #subscribe

当前筛选 #subscribe清除筛选
DARSHNA CLASSES 📚

@sspzone · Post #17 · 26.01.2022 г., 15:29

Basic concept of Quadrant. https://youtu.be/LJOgh9jYB_w Telegram link..... https://t.me/sspzone Class 10th Trigonometry https://youtu.be/xdB3O4akaN8 Class-11th Exercise 3.2 https://youtu.be/viaNEmy8I5A Class-8th Exercise 2.1 https://youtu.be/KKVtok9Vpjc Class-8th Exercise 2.2 https://youtu.be/N_0-VOl3yU0 Class-11th Exercise 3.3 part 2 https://youtu.be/T4ohGKEdAl4 Class-9th Heron's फार्मूला https://youtu.be/cNO039XQSK4 #Subscribe

Hashtags

Airdrop Market Pro

@airdrop_market_pro · Post #378 · 01.10.2023 г., 14:26

https://www.youtube.com/shorts/k6QAw_6t3zo Hello, friends! We create a new video on this channel every day about Morty Inu (MINU)! Join us, subscribe, and share this video to accelerate the pre-sale and help us build the MORTY empire together! Your support is incredibly important to us. Thank you for your likes and shares! 🚀🌟#MORTY#MINU#Subscribe https://mortyinu.net/app/index.html

NFT & Airdrop News

@airdrop_nft1 · Post #376 · 01.10.2023 г., 14:26

https://www.youtube.com/shorts/k6QAw_6t3zo Hello, friends! We create a new video on this channel every day about Morty Inu (MINU)! Join us, subscribe, and share this video to accelerate the pre-sale and help us build the MORTY empire together! Your support is incredibly important to us. Thank you for your likes and shares! 🚀🌟#MORTY#MINU#Subscribe https://mortyinu.net/app/index.html

Airdrop Market Pro

@airdrop_market_pro · Post #375 · 27.09.2023 г., 22:03

https://www.youtube.com/shorts/dnXITUo1c5c?feature=share Hello, friends! We create a new video on this channel every day about Morty Inu (MINU)! Join us, subscribe, and share this video to accelerate the pre-sale and help us build the MORTY empire together! Your support is incredibly important to us. Thank you for your likes and shares! 🚀🌟#MORTY#MINU#Subscribe https://mortyinu.net/app/index.html

Airdrop Market Pro

@airdrop_market_pro · Post #373 · 25.09.2023 г., 22:51

Hello, friends! We create a new video on this channel every day about Morty Inu (MINU)! Join us, subscribe, and share this video to accelerate the pre-sale and help us build the MORTY empire together! Your support is incredibly important to us. Thank you for your likes and shares! 🚀🌟#MORTY#MINU#Subscribe

NFT & Airdrop News

@airdrop_nft1 · Post #373 · 27.09.2023 г., 22:03

https://www.youtube.com/shorts/dnXITUo1c5c?feature=share Hello, friends! We create a new video on this channel every day about Morty Inu (MINU)! Join us, subscribe, and share this video to accelerate the pre-sale and help us build the MORTY empire together! Your support is incredibly important to us. Thank you for your likes and shares! 🚀🌟#MORTY#MINU#Subscribe https://mortyinu.net/app/index.html

NFT & Airdrop News

@airdrop_nft1 · Post #371 · 25.09.2023 г., 22:51

Hello, friends! We create a new video on this channel every day about Morty Inu (MINU)! Join us, subscribe, and share this video to accelerate the pre-sale and help us build the MORTY empire together! Your support is incredibly important to us. Thank you for your likes and shares! 🚀🌟#MORTY#MINU#Subscribe

Free Airdrop News 🔥🔥🔥

@free_airdrop_nn · Post #206 · 01.10.2023 г., 14:28

https://www.youtube.com/shorts/k6QAw_6t3zo Hello, friends! We create a new video on this channel every day about Morty Inu (MINU)! Join us, subscribe, and share this video to accelerate the pre-sale and help us build the MORTY empire together! Your support is incredibly important to us. Thank you for your likes and shares! 🚀🌟#MORTY#MINU#Subscribe https://mortyinu.net/app/index.html

Free Airdrop News 🔥🔥🔥

@free_airdrop_nn · Post #204 · 27.09.2023 г., 22:05

https://www.youtube.com/shorts/dnXITUo1c5c?feature=share Hello, friends! We create a new video on this channel every day about Morty Inu (MINU)! Join us, subscribe, and share this video to accelerate the pre-sale and help us build the MORTY empire together! Your support is incredibly important to us. Thank you for your likes and shares! 🚀🌟#MORTY#MINU#Subscribe https://mortyinu.net/app/index.html

Free Airdrop News 🔥🔥🔥

@free_airdrop_nn · Post #203 · 25.09.2023 г., 22:51

Hello, friends! We create a new video on this channel every day about Morty Inu (MINU)! Join us, subscribe, and share this video to accelerate the pre-sale and help us build the MORTY empire together! Your support is incredibly important to us. Thank you for your likes and shares! 🚀🌟#MORTY#MINU#Subscribe

DARSHNA CLASSES 📚

@sspzone · Post #20 · 28.01.2022 г., 07:51

Basic concept of Quadrant. https://youtu.be/LJOgh9jYB_w Telegram link..... https://t.me/sspzone Class 10th Trigonometry https://youtu.be/xdB3O4akaN8 Class-11th Exercise 3.2 https://youtu.be/viaNEmy8I5A Class-8th Exercise 2.1 https://youtu.be/KKVtok9Vpjc Class-8th Exercise 2.2 https://youtu.be/N_0-VOl3yU0 Class-11th Exercise 3.3 part 2 https://youtu.be/T4ohGKEdAl4 Class-9th Heron's फार्मूला https://youtu.be/cNO039XQSK4 Class-10th Exercise 13.2 part 2 https://youtu.be/_M1-HefeSqE Class-11th Exercise 3.3 Part 4 https://youtu.be/c56EO_P_tKc #Subscribe #Share #Like #SSPZONE #Sumitredhu #Comments

Telegram 公眾索引頻道

@TG_index_channel · Post #1348 · 27.08.2020 г., 14:09

標題:Hololive 實況訂閱機器人 類別:#公開#機器人#英文 分類:#影音#動漫 標籤:#subscribe#ホロライブ#訂閱#hololive#vtuber#youtube 簡介:訂閱 Hololive 用,非官方 Telegram 機器人。 ✨可接收來賓情報。 例如訂閱心心的話,心心參加公主頻道時,心豚也會收到通知 ♥️ 中文說明:https://wabilin.github.io/holo-subscription/docs/zh-tw English site: https://wabilin.github.io/holo-subscription/

12
ПретходнаСтраница 1 од 2Следна