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

Резултати

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

Пребарај: #advert

当前筛选 #advert清除筛选
BUSINESS INSPIRATION & KNOWLEDGE

@Entrepreneursquotes · Post #3931 · 29.11.2022 г., 10:20

#Advert My online marketing "secret weapon" Hi there, I just wanted to shoot you a quick update about a killer tracking and optimization platform called ClickMagick: https://clickmagick.com/go/Tajedo It helps you to scientifically track and optimize all your ads and promotions, all in one place ... ... and get more leads,conversions and revenues from the same traffic you're already getting. There's nothing else like this out there. Check out the free trial and let me know what you think: https://clickmagick.com/go/Tajedo You can Read our Affiliate Disclosure.

Hashtags

BUSINESS INSPIRATION & KNOWLEDGE

@Entrepreneursquotes · Post #3818 · 04.11.2022 г., 11:50

#Advert Software as a Service (SAAS) tool for business owner & Marketers GrowMeOrganic GrowMeOrganic is an all-in-one sales automation platform that helps you find verified business emails of your potential clients and send email sequences with automated email follow-ups. Features: ✅ Extract unlimited emails from LinkedIn search results and export them in form of CSV ✅ Get access to 15 Million B2B company databases across the world which you can filter by a specific Industry and Country ✅ Find contact details of all the employees from any company ✅ Extract contact details of the local business list on google my business ✅ Send unlimited cold emails with automated follow-ups. ✅ Use our email warm-up system to avoid landing your emails in spam Try GrowMeOrganic

Hashtags

BUSINESS INSPIRATION & KNOWLEDGE

@Entrepreneursquotes · Post #3714 · 13.10.2022 г., 20:16

#Advert Business owners, product creators, service providers, coaches, retailers, ecommerce site managers, virtual assistants... No matter who you are, if you're selling an offer online, you need a high-converting sales page. And our brandable course, How to Create Sales Pages that Convert, walks through each essential step needed to put together a sales page that converts visitors to paying customers. The package is one of our full Blaze course kits so it includes a Course Book, Action Guide, Cheat Sheet, Slideshow, Lead Magnet, Follow-Up Emails, Blog Posts, and more. What's the weekend special? Course: How to Create Sales Pages that Convert Dates: Friday, October 14th to Monday, October 17th Discount: 50% Off NEW Upgrade Pack: Quizzes and Sale Copy Upgrade Bonus: Social Media Images

Hashtags

BUSINESS INSPIRATION & KNOWLEDGE

@Entrepreneursquotes · Post #3618 · 23.09.2022 г., 11:30

#Advert My online marketing "secret weapon" Hi there, I just wanted to shoot you a quick update about a killer tracking and optimization platform called ClickMagick: https://clickmagick.com/go/Tajedo It helps you to scientifically track and optimize all your ads and promotions, all in one place ... ... and get more leads,conversions and revenues from the same traffic you're already getting. There's nothing else like this out there. Check out the free trial and let me know what you think: https://clickmagick.com/go/Tajedo You can Read our Affiliate Disclosure.

Hashtags

BUSINESS INSPIRATION & KNOWLEDGE

@Entrepreneursquotes · Post #3104 · 28.06.2022 г., 10:40

#Advert #photoediting#graphicdesign Even if you don’t know Photoshop, you can work on pictures with great design. With the help of thousands of design templates on this site, you can easily create booklets, logos, promotional images, packaging, presentations, promotional images, invitations, infographics and... many other types of design images. LINK 👉Canva