zip

先上官网的定义:

zip

 zip的使用:

将多个 list 组合成 tuple 的 list:

zip
 

 将多个 list 组成 dict:

zip

将多个 tuple 组成的 list 拆分成多个 tuple:

zip

 将多个 list 组成的 list 拆分成多个 tuple:

zip

将多个 tuple 组成的 tuple 拆分成多个 tuple:

zip

将列表中相邻的几项合并:

zip

 

参考博客;

https://blog.csdn.net/pipixiu/article/details/81255533#%E8%87%B4%E8%B0%A2

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-06-26
  • 2021-07-04
猜你喜欢
  • 2021-11-22
  • 2021-06-19
相关资源
相似解决方案