您的位置: 首页 > 文章 > Python zip避坑 Python zip避坑 分类: 文章 • 2024-02-14 20:42:34 Python zip() 函数 最近使用zip函数时出现了一些错误,简单记录一下。有错误的地方,欢迎大佬批评。 初始化几个列表输出结果: zip基本用法:从多个列表中各自依次取出一个元素组合,组合后的元素个数为较短数组中元素个数 输出结果:避坑1:无法直接使用print(C)打印输出结果:避坑2:zip返回的是一个迭代器输出结果: python中的函数还有很多,日后慢慢学习。