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

Резултати

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

Пребарај: #bournemouth

当前筛选 #bournemouth清除筛选
🏆 Info 288 - DEPORTES

@info288_deportes · Post #35108 · 30.08.2024 г., 11:30

⚽️🏴󠁧󠁢󠁥󠁮󠁧󠁿Premier Oficial: Kepa se marcha cedido al Bournemouth#Bournemouth#Kepa El futuro de Kepa ya se ha decidido. El guardameta ha estado todo el verano esperando a ver qué podía pasar con Lunin y el Real Madrid, pero finalmente hace las maletas para seguir en la Premier League. Su nuevo club, el Bournemouth, al que llega en calidad de cedido para intentar seguir sumando minutos. Lo hace, eso sí, renovando con el Chelsea un año más para no irse el próximo verano gratis. https://www.marca.com/futbol/premier-league/2024/08/29/66d0466c268e3ebe7a8b4595.html 🏆@Info288_deportes

La Guía del Fútbol

@LaGuiadelFutbol · Post #36262 · 16.08.2025 г., 16:14

Jugador del día 15/08/2025: HUGO EKITIKE 🇨🇵 #Liverpool arrancó con el pie derecho la defensa del título. Gol, asistencia y gran actuación del francés para que los reds le ganen al #Bournemouth⚽️ #WorldFootballMVP #PremierLeague 🗞Vía:Jugador del Día @LaGuiadelFutbol

AI match predictions

@ai_match_prediction · Post #11664 · 22.04.2026 г., 13:05

England Premier League🏴󠁧󠁢󠁥󠁮󠁧󠁿 2026-04-22 19:00 UTC Bournemouth vs. Leeds Predicted outcome: Draw✅ Predicted score: 1:1 Actual: Draw 2:2 #Bournemouth#Leeds 2026-04-22 19:00 UTC Burnley vs. Manchester City Predicted outcome: Manchester City✅ Predicted score: 1:3 Actual: Manchester City 0:1 #Burnley#ManchesterCity #Football#PremierLeague

AI match predictions

@ai_match_prediction · Post #11877 · 03.05.2026 г., 05:05

England Premier League🏴󠁧󠁢󠁥󠁮󠁧󠁿 2026-05-03 13:00 UTC Bournemouth vs. Crystal Palace Predicted outcome: Bournemouth✅ Predicted score: 2:1 Actual: Bournemouth 3:0 #Bournemouth#CrystalPalace 2026-05-03 14:30 UTC Manchester United vs. Liverpool Predicted outcome: Manchester United✅ Predicted score: 2:1 Actual: Manchester United 3:2 #ManchesterUnited#Liverpool 2026-05-03 18:00 UTC Aston Villa vs. Tottenham Predicted outcome: Aston Villa❌ Predicted score: 2:1 Actual: Tottenham 1:2 #AstonVilla#Tottenham #Football#PremierLeague

AI match predictions

@ai_match_prediction · Post #11422 · 11.04.2026 г., 05:05

England Premier League🏴󠁧󠁢󠁥󠁮󠁧󠁿 2026-04-11 11:30 UTC Arsenal vs. Bournemouth Predicted outcome: Arsenal❌ Predicted score: 2:1 Actual: Bournemouth 1:2 #Arsenal#Bournemouth 2026-04-11 14:00 UTC Burnley vs. Brighton Predicted outcome: Brighton✅ Predicted score: 1:2 Actual: Brighton 0:2 #Burnley#Brighton 2026-04-11 14:00 UTC Brentford vs. Everton Predicted outcome: Draw✅ Predicted score: 1:1 Actual: Draw 2:2 #Brentford#Everton 2026-04-11 16:30 UTC Liverpool vs. Fulham Predicted outcome: Liverpool✅ Predicted score: 2:1 Actual: Liverpool 2:0 #Liverpool#Fulham #Football#PremierLeague

AI match predictions

@ai_match_prediction · Post #11974 · 09.05.2026 г., 05:05

England Premier League🏴󠁧󠁢󠁥󠁮󠁧󠁿 2026-05-09 11:30 UTC Liverpool vs. Chelsea Predicted outcome: Liverpool❌ Predicted score: 3:2 Actual: Draw 1:1 #Liverpool#Chelsea 2026-05-09 14:00 UTC Fulham vs. Bournemouth Predicted outcome: Bournemouth✅ Predicted score: 1:2 Actual: Bournemouth 0:1 #Fulham#Bournemouth 2026-05-09 14:00 UTC Brighton vs. Wolves Predicted outcome: Brighton✅ Predicted score: 2:0 Actual: Brighton 3:0 #Brighton#Wolves 2026-05-09 14:00 UTC Sunderland vs. Manchester United Predicted outcome: Manchester United❌ Predicted score: 1:2 Actual: Draw 0:0 #Sunderland#ManchesterUnited 2026-05-09 16:30 UTC Manchester City vs. Brentford Predicted outcome: Manchester City✅ Predicted score: 2:1 Actual: Manchester City 3:0 #ManchesterCity#Brentford #Football#PremierLeague

AI match predictions

@ai_match_prediction · Post #11558 · 18.04.2026 г., 05:05

England Premier League🏴󠁧󠁢󠁥󠁮󠁧󠁿 2026-04-18 11:30 UTC Brentford vs. Fulham Predicted outcome: Brentford❌ Predicted score: 2:1 Actual: Draw 0:0 #Brentford#Fulham 2026-04-18 14:00 UTC Newcastle vs. Bournemouth Predicted outcome: Draw❌ Predicted score: 2:2 Actual: Bournemouth 1:2 #Newcastle#Bournemouth 2026-04-18 14:00 UTC Leeds vs. Wolves Predicted outcome: Leeds✅ Predicted score: 2:1 Actual: Leeds 3:0 #Leeds#Wolves 2026-04-18 16:30 UTC Tottenham vs. Brighton Predicted outcome: Brighton❌ Predicted score: 1:2 Actual: Draw 2:2 #Tottenham#Brighton 2026-04-18 19:00 UTC Chelsea vs. Manchester United Predicted outcome: Draw❌ Predicted score: 2:2 Actual: Manchester United 0:1 #Chelsea#ManchesterUnited #Football#PremierLeague