In many of my python modules, I am using
from itertools import izip_longest
But now I am moving my codebase to Py3 (compatible with Py2 at the sa
You can wrap that exact code inside a module of your own, say itertools_compat.py, and just write
itertools_compat.py
from itertools_compat import izip_longest
wherever you need this function.