py3.7 itertools 问题求解

门外汉_007 2018-10-25 11:03:55
我在网上没有找到itertools的模块,只找到了一个more_itertools的模块,但是在该模块下没有zip_longes()这个函数。请问是怎么回事
...全文
111 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
混沌鳄鱼 2018-10-25
  • 打赏
  • 举报
回复
引用 2 楼 weixin_41743403 的回复:
more_itertools 这个模块里面没有zip_longest这个函数吗?

itertools 是内置模块,直接import就可以了。
门外汉_007 2018-10-25
  • 打赏
  • 举报
回复
more_itertools 这个模块里面没有zip_longest这个函数吗?
混沌鳄鱼 2018-10-25
  • 打赏
  • 举报
回复

Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> 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']
>>>

门外汉_007 2018-10-25
  • 打赏
  • 举报
回复
我装的py3.7没得 , 我在github上找到了 现在已经有了 谢谢了

37,719

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • IT.BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧