I have two blocks of code that I would like to combine into one python script. One block of code is written in Python 2.7, the other in Python 3.6
My question is, is there some way to call an old version of python mid script to run that specific block of code?
For instance, if I ran the following code, the script would error out because the second print statement is missing the parenthesis:
#Running python 2 and 3!!
#Py 2
print "Python 2"
#Py 3
print "Python 3"
Note: Converting the block of code written in 2.7 is possible, but will take a very long time; Time that I do not have at the moment.