title: How do you split a string at a specific point?
body: <p>I am new to python and want to split what I have read in from a text file into two specific parts. Below is an example of what could be read in:</p>
  
  <pre><code>f = ['Cats','like','dogs','as','much','cats.'][1,2,3,4,5,4,3,2,6]
  </code></pre>
  
  <p>So what I want to achieve is to be able to execute the second part of the program is:</p>
  
  <pre><code>words = ['Cats','like','dogs','as','much','cats.']
  
  numbers = [1,2,3,4,5,4,3,2,6]
  </code></pre>
  
  <p>I have tried using:</p>
  
  <pre><code>words,numbers = f.split("][")
  </code></pre>
  
  <p>However, this removes the double bracets from the two new variable which means the second part of my program which recreates the original text does not work.</p>
  
  <p>Thanks.</p>