title: How would I create a new line in a text document after the nth word?
body: <p>I am working on a project in which I have to list a whole lot of things out in this format</p>
  <pre><code>[*] This is the first object
  [*] This is the second object
  [*] When the object gets too long, I need to move it to the next line
      to look like this. 
  </code></pre>
  <p>I created a <code>.py</code> file and a <code>.txt</code> file. I would input the list objects into the <code>.py</code> file and it would properly format it into the text file. I tried something like this:</p>
  <pre><code>text = input('&gt; ')
  with open('list.txt', 'a') as f:
      f.write(f'[*] {t}\n')
  </code></pre>
  <p>But I can't seem to move it to the next line. Around the 15th word, is when I want to go to a new line.</p>
  <p>How can I achieve this?</p>