1 Antwort
+ 1
You can use an "if" statement to run different code according to Python version:
from sys import version_info
if(version_info >= 3.0.0)
your_list = input()
else
your_list = raw_input()
You can also create different functions for different Python versions and call either one from a similar "if" statement.