How to add new line in python. for example, I would like to print the rest of a sentence in a new line. but instead of putting "\n", I will automate it to type to a new line for every six words.
def wrapper(words, n):
to_print = ''
for i in range(0, len(words.split()), n):
to_print += ' '.join(words.split()[i:i+n]) + '\n' # new line
return to_print
print(wrapper('a b c d e f g h i j k l m n o p r s t u w x y z', 6))
print('any text')
Description