Can a string be splited to substrings of fixed length using split() function? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Can a string be splited to substrings of fixed length using split() function?

split() function in python

23rd Jan 2018, 10:26 AM
Thejus Jain K.P
Thejus Jain K.P - avatar
1 ответ
+ 1
in java you can use this regex which should work in Python too: (?<=\\G.{3}) replace the 3 with your length
23rd Jan 2018, 10:38 AM
Jeremy
Jeremy - avatar