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
note: you might want to pick a different name for file as it shadows the buildtin
file
this works in Python 2 and 3
xval,yval,zval = map(int,file.split('-'))