I can't find imap() in itertools in Python

后端 未结 3 1731
时光说笑
时光说笑 2021-02-11 16:30

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

3条回答
  •  盖世英雄少女心
    2021-02-11 17:21

    You are using Python 3, therefore there is no imap function in itertools module. It was removed, because global function map now returns iterators.

提交回复
热议问题