更新时间:2023-12-02 14:47:58
你想要的是 itertools.product
for li, lj, lk in itertools.product(cntr1, cntr2, cntr3):
print li, lj, lk
将完全按照您的要求进行操作。该名称源于笛卡尔积的概念。
Will do exactly what you are requesting. The name derives from the concept of a Cartesian product.