I'm doing a program for a class of mine and I am having trouble splitting my strings up. I know you can do something like:
a = '012345'
a[0:3]
returns 012
but I am inputing strings of varying length and I cant just do the above notation. I need to split the string into groups of 3 in order to work. Any help would be much appreciated.
a = '012345'
a[0:3]
returns 012
but I am inputing strings of varying length and I cant just do the above notation. I need to split the string into groups of 3 in order to work. Any help would be much appreciated.
Comment