Can a string be splited to substrings of fixed length using split() function? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
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 Réponse
+ 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