How to Solve NameError: name 'izip_longest' is not defined -- itertools

Solution: Import the 'izip_longest' module

# Add the following line to the top of your code
from itertools import izip_longest

 

For more information:
itertools izip_longest