Get the App
SLTechnology News&Howtos  ›  Development  › 

How to iterate two lists at the same time by python

Shulou Source: shulou.com Published: 2022-06-01 05:55:00 10月01日 Update

This article will explain in detail how python can iterate two lists at the same time. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Two lists iterate simultaneously

Nfc = ["Packers", "49ers"] afc = ["Ravens", "Patriots"] for teama, teamb in zip (nfc, afc): print teama + "vs." + teamb > Packers vs. Ravens > 49ers vs. Patriots's article on "how to iterate two lists at the same time" ends here. I hope the above content can be helpful to you, so that you can learn more knowledge, if you think the article is good. Please share it for more people to see.

Tags: Two at the same time iteration article more good practical content article knowledge reference help related Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Huawei Shulou Information Redmi Linux