我可以打印没有括号的列表吗?

2024-04-19 14:02:35 发布

您现在位置:Python中文网/ 问答频道 /正文

from itertools import product
A=((1,2),(3,4))
B= list(product(*A)) 
print (B)   

我的输出是

[(1, 3), (1, 4), (2, 3), (2, 4)] 

但我想要我的成果

(1, 3) (1, 4) (2, 3) (2, 4)

Tags: fromimportproductlistprintitertools成果