title: What is the best way to cast variables when unpacking iterables?
body: <p>In my code I am reading lines from a file. Each line contains space delimited values.</p>
  <pre><code>foo True 8 9.2
  bar False 17 -3.1
  </code></pre>
  <p>After reading the file and splitting the text by line. I will end up with a list.</p>
  <pre><code>lines = ['foo True 8 9.2', 'bar False 17 -3.1']
  </code></pre>
  <p>I then iterate through the lines and unpack the variables using <code>.split()</code>:</p>
  <pre><code>for line in lines:
      string, boolean, integer, floating_point = line.split()
  </code></pre>
  <p>I then cast each variable to its proper type:</p>
  <pre><code>boolean = bool(boolean)
  integer = int(integer)
  floating_point = float(floating_point)
  </code></pre>
  <p>My question is, is there a more Pythonic way to cast the variables and/or use less lines?</p>