![izip python 3 izip python 3](https://pic2.zhimg.com/v2-692a352b95b7d1d69c5b5d50fbf0706d_r.jpg)
Instead one needs to use dict.keys() and dict.values() for error-free execution of the program. erkeys() and ervalues() have also been removed from Python 3.
![izip python 3 izip python 3](https://www.w3resource.com/w3r_images/python-data-type-list-exercise-64.png)
Programmers need to use ems() for iteration of the dictionary while working in python 3. If one uses Python 3, It’s common to incur an attribute error reading ‘dict’ has no attributes’ iteritems.’ This error is so because in python 3 the functionality of eritems() has been transferred to ems(). Now, items() return iterators and never builds a list entirely in Python 3. The latter has been removed from Python 3. However, since items() performed almost the same task as iteritems(). The items() function returns a copy, whereas iteritems() is less time consuming and less memory exhausting. In Python, items() is time-consuming and memory exhausting. As a result, you have to use the exception handling technique and iteritems while iteration of long lists in dictionaries to avoid AttributeError. Wrong module name or importing the faulty module generates attribute errors. While importing itertools into a python program, numerous errors crop up, the most common one being attribute error. Errors while importing itertools in Python Combinaton iterators presenting the iterator module of python are product(), permutations(), combinations() and combination_with_replacement(). Iterators terminating on shortest input sequence like accumulate(), chain(), compress(), dropwhile(), filterfalse(),islice(), strmap(),etc each having very unique distinct results. Itertools used for iterations present in the python 3 library are infinite iterators like count(), cycle(), repaeat(). However, using eritems() does not create any result and raises an error. ems() works in python 2 but never generates the list entirely. The above two python codes demonstrate the use of eritems() and dict.tems() in Python 2 and Python 3.