I have a problem that I want to solve with itertools.imap(). However, after I imported itertools in IDLE shell and called itertools.imap(), the IDLE shell told me that itertools
If you want something that works in both Python 3 and Python 2, you can do something like:
try: from itertools import imap except ImportError: # Python 3... imap=map