Нужна помощь донатом
для написания учебников Kotlin, Java, C++, C#, Go, Rust, Dart
подробности по ссылке
⊗pyPmREMFmP 65 of 128 menu
◀ ▶

Pockets in Python's fullmatch method

The fullmatch method can also be used to split the results into pockets.

Let's look at an example. Let's say we have a line:

txt = '123 456 789'

Let's distribute all her numbers among her pockets:

res = re.fullmatch('(\d+)\s(\d+)\s(\d+)', txt) print(res[1]) # '123' print(res[2]) # '456' print(res[3]) # '789'

Given a string:

txt = '2025-12-31'

Divide it into three pockets.

← →
↑
English▼
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline