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

Solution: Import the 'count' module

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

 

For more information:
itertools count