title: Convert string-tuple to a tuple
body: <p>I have an input file with the following format:</p>
  
  <pre class="lang-none prettyprint-override"><code>[(1,1),(2,1)], 'add', 11
  [(1,2),(1,3)], 'div', 2
  [(3,1),(4,1),(3,2),(4,2)], 'times', 240
  [(2,2),(2,3)], 'minus', 3
  ...
  </code></pre>
  
  <p>Each line is a tuple I want to create. How is it possible to convert each string line into a tuple?</p>
  
  <p>For example, line <code>string "[(1,1),(2,1)], 'add', 11"</code> should be converted to a tuple: <code>([(1, 1), (2, 1)], 'add', 11)</code>.</p>
  
  <p>So far, I tried:</p>
  
  <pre><code>tuples = []
  for line in file:
      tuples.append((line,))
  </code></pre>
  
  <p>But I am getting a string conversion</p>
  
  <pre><code> [("[(1,1),(2,1)], 'add', 11\n",), ("[(1,2),(1,3)], 'div', 2\n",), ("[(3,1),(4,1),(3,2),(4,2)], 'times', 240\n",), ("[(2,2),(2,3)], 'minus', 3",)]
  </code></pre>