Backward compatible of Python 2 and Python 3

Pradeep Patra smilesonisamal at gmail.com
Mon Jun 5 03:24:07 EDT 2017


Hi,

I want to make a program which works in both python 2.7 and python 3. Is it
possible?
For example python 2.7 have raw_input() to accept the input from command
line whereas python 3.x method is input().

So I want to make sure the same program works in both the python versions.

https://stackoverflow.com/questions/26174743/python-making-a-fast-port-scanner

Regards
Pradeep



More information about the Python-list mailing list