Can you make that thats code run in python 2.7 from 3.5 [closed]

@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:

    input = raw_input  # Py2
except NameError:
    pass               # Py3

or with six:

from six.moves import input

Leave a Comment