title: Efficient way to convert strings from split function to ints in Python
body: <p>I have a string of data with the following format: xpos-ypos-zoom (i.e. 8743-12083-15) that I want to split up and store in the variables xpos, ypos, and zoom. Since I need to do some calculations with these number I'd like to convert them to integers right from the beginning. Currently, the way I'm doing this is with the following code:</p>
  
  <pre><code>file = '8743-12083-15'
  xval, yval, zoom  = file.split("-")
  xval = int(xval)
  yval = int(yval)
  </code></pre>
  
  <p>It seems to me there should be a more efficient way of doing this. Any ideas?</p>