can not import from itertools izip on Python 3
Question:
On my project, I’m trying to import izip library, but is not working
from itertools import izip
from random import normalvariate, random
from datetime import timedelta, datetime
and I get this error:
from itertools import izip
ImportError: cannot import name 'izip'
but am only trying to import the library to my python 3 project
Answers:
In python 3
just use zip
instead of izip
without importing anything.
On my project, I’m trying to import izip library, but is not working
from itertools import izip
from random import normalvariate, random
from datetime import timedelta, datetime
and I get this error:
from itertools import izip
ImportError: cannot import name 'izip'
but am only trying to import the library to my python 3 project
In python 3
just use zip
instead of izip
without importing anything.