Mam problem, który chcę rozwiązać za pomocą itertools.imap(). Jednak po zaimportowaniu itertools w powłoce IDLE i nazwie itertools.imap(), shell IDLE powiedział mi, że itertools nie ma atrybutu imap. Co idzie źle?Nie mogę znaleźć imap() w itertools w Pythonie
>>> import itertools
>>> dir(itertools)
['__doc__', '__loader__', '__name__', '__package__', '__spec__', '_grouper', '_tee', '_tee_dataobject', 'accumulate', 'chain', 'combinations', 'combinations_with_replacement', 'compress', 'count', 'cycle', 'dropwhile', 'filterfalse', 'groupby', 'islice', 'permutations', 'product', 'repeat', 'starmap', 'takewhile', 'tee', 'zip_longest']
>>> itertools.imap()
Traceback (most recent call last):
File "<pyshell#13>", line 1, in <module>
itertools.imap()
AttributeError: 'module' object has no attribute 'imap'
To może być interesująca również przyjrzeć [itertools.starmap] (https://docs.python.org/3.6/library/itertools.html#itertools.starmap) w pyhton3. –