@Rob is definetly right about the from __future__ import division, print_function
line.
But if you also want to have the equivalent input
function you could use:
try:
input = raw_input # Py2
except NameError:
pass # Py3
or with six
:
from six.moves import input