'i want to load text from a file and arrange the text 4 words on each line [closed]

i want to load text from a file and arrange the text 4 words on each line

    with open(text_file, 'r') as f:
        size_to_read = 100
        lines = f.read(size_to_read)
        while len(lines) > 0:
            print(lines, end="")
            lines = f.read(size_to_read)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source