@QuietWorld · Post #6825 · 30.10.2019 г., 23:30
🔖 Everything that irritates us about others can lead us to an understanding of ourselves. • Carl Jung • Memories, Dreams, Reflections #reflection@quietworld🍃
Hashtags
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
Пребарај: #reflection
@QuietWorld · Post #6825 · 30.10.2019 г., 23:30
🔖 Everything that irritates us about others can lead us to an understanding of ourselves. • Carl Jung • Memories, Dreams, Reflections #reflection@quietworld🍃
Hashtags
@doniyorieltss · Post #1472 · 20.05.2023 г., 01:55
#reflectionon my recent results... For a start, let me just say that I'm more than grateful for another 8.5, not least because it's an improvement over the last one. Yes, I've come so close to securing that elusive Band 9. You know what? I even thought I did. But for me, it's not so much about the score as it is about fun and experience. As much as I may come across as someone chasing after a 9.0, I honestly couldn't care less. Clearly, it is a big milestone and for good reason — very few people understand what it takes to really get there, and I'm fortune enough to be one of them. But I already stopped caring too much about what I now know is nothing but a number — at least I'm trying to do so. In fact, I did not even prepare for this test of mine, which I normally would. I just wanted to see if I was good enough to score a 9.0 on Speaking and 8.0 on Writing; apparently, I am not! In any case, it was all supposed to be fun — something that I did just for the sake of a dopamine hit; a 180-dollar one, in fact. 😅 Seriously, even as I was taking the Speaking test, I could barely suppress the joy that I felt creeping up, because that was the best performance I'd ever put on in my life! There is also a sense of elation at waiting for your results, even more so when you don't know the exact day of the release. And having fun with your friends until 3.00 AM on the occasion of a satisfactory result is a whole nother level! To sum it all up, I would love to achieve what appears to be the greatest feat of IELTS — Band 9.0. However, I shouldn't have to work for it, as it is not priority 'numero uno': the score is supposed to be only a fraction of a lifelong endeavour — at least for me it is! @ieltsulugbeks
Hashtags
@doniyorieltss · Post #1279 · 31.03.2023 г., 18:44
#reflection Lurching from one task to another, I have been finding myself get sucked into the whirlwind of work time and again. That dreadful thing! It's so counterproductive: You want to lead an exemplary lifestyle, and so you work. You think all your troubles will fade away as you take up work. Little do you know, however, more ordeals than ever before are looming on the horizon — starting a new career, unless tapped into, is a surefire way to put a bigger strain on your already deteriorating social life. Instead of lightening your burden, your work just keeps making you all the more miserable, and before you know it, you will be enslaved by what was only supposed to help you. @ieltsulugbeks
Hashtags
@QuietWorld · Post #7633 · 09.10.2020 г., 03:54
Don't read till the end. . . . . . . I hope you are a rebel though 😉 #life#reflection @quietworld🍃
Hashtags
@bestwallpapes · Post #3322 · 22.03.2025 г., 09:25
@Bestwallpapes #Landscape#Reflection
Hashtags
@QuietWorld · Post #6694 · 12.10.2019 г., 14:00
Never feel self-pity, the most destructive emotion there is. How awful to be caught up in the terrible squirrel cage of self. — Millicent Fenwick – #quotes#reflection#selfreminder @quietworld🍃
Hashtags
@FinancialFreedomMagazine · Post #1067 · 13.12.2021 г., 04:39
THIS WEEK... Instead of a weekly #book challenge, we have a #reflection challenge. Basically, the idea is to use this time of year to intentionally discover and align yourself with the work you’re meant to do in 2022. To help you with this, you can download ⬇️ --The 2021-22 Annual Reflection Template-- It's a structured deep dive into who you are, who you might become, and what you want to create for 2022.
Hashtags
@QuietWorld · Post #6688 · 11.10.2019 г., 08:30
Men go abroad to wonder at the heights of mountains, at the huge waves of the sea, at the long courses of the rivers, at the vast compass of the ocean, at the circular motions of the stars; and they pass by themselves.., without wondering. – St. Augustine – #solitude#quotes#reflection @quietworld🍃
Hashtags
@QuietWorld · Post #6654 · 07.10.2019 г., 04:39
You have to start knowing yourself so well that you begin to know other people – a piece of us is in every person we can ever meet. —John D. MacDonald – #quotes#solitude#reflection @quietworld🍃
Hashtags
@Wallpaper_INT · Post #46090 · 10.04.2025 г., 15:30
#Stones#Water#Reflection#8K @Wallpaper_INT
Hashtags
@QuietWorld · Post #6683 · 10.10.2019 г., 09:30
Often we change..; jobs, friends and spouses.. instead of ourselves. — Akbarali H. Jetha – #quotes#reflection#selfdevelopment @quietworld🍃
@QuietWorld · Post #7177 · 30.01.2020 г., 21:57
#words#unusualwords#reflection @quietworld🍃
Hashtags