小编moh*_*n h的帖子

python中两个列表的笛卡尔积

python中两个列表的笛卡尔积

list1 = ['a', 'b']
list2 = [1, 2, 3, 4, 5]
Run Code Online (Sandbox Code Playgroud)

预期产量:

list3 = ['a1', 'a2', 'a3', 'a4', 'a5', 'b1', 'b2', 'b3', 'b4', 'b5']
Run Code Online (Sandbox Code Playgroud)

python

4
推荐指数
3
解决办法
3623
查看次数

标签 统计

python ×1