Splitting a string by list of indices,print('\n'.join(parts))