I have a problem with dividing a string for n length strings which should be in array.
Is there any built function in Python which can do that, like for example .grouped
in Scala?
e.g. word= 'ABCDEFG'
, n=3
Result: ['ABC','DEF','G']
I have a problem with dividing a string for n length strings which should be in array.
Is there any built function in Python which can do that, like for example .grouped
in Scala?
e.g. word= 'ABCDEFG'
, n=3
Result: ['ABC','DEF','G']