您的位置:首页 > 编程语言 > Python开发

differences in python 2 and python 3

2016-04-21 20:33 756 查看
map function, python 2 extending with None to longest, python 3 stop at the shortest. point of interest:
itertools.zip_longest(*iterables, fillvalue=None)
(python 3),
itertools.izip_longest(*iterables[, fillvalue])
(python 2.6+)

integer division, if you want python 2 behavior in python 3, using // instead.

ref: Supporting Python 3, Language differences and workarounds
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  python