to add certain symbol after every three got splited lines Something like that?? -
print('@'.join(st_text[i:i + 3] for i in range(0, len(st_tex), 3)))
to add certain symbol after every three got splited lines Something like that?? -
print('@'.join(st_text[i:i + 3] for i in range(0, len(st_tex), 3)))
This code looks if there are three or more commas in the text. If it is, it splits the text into 4 parts, then concats the 3 first parts and adds an
@before the third comma and redo the same process with the remaining text (4th part):