最佳答案
如果我有两个字符串,'abc'
和 'def'
,我可以使用两个 for 循环得到它们的所有组合:
for j in s1:
for k in s2:
print(j, k)
不过,我希望能够使用列表内涵来做到这一点。我试了很多方法,但都没有成功。有人知道怎么做吗?