-*-coding:utf-8-*-
import itertools;
# a=[1,2,3];
# b=[4,5,6];
a = '不行;广大;大幅度;老;充分;大钱;大规模;特大;爸爸;俊雅;可怜;死;杀'.split(';')
b = '常温;超低温;高温;恒温;候温;炉温;气温;室温;水温;体温'.split(';')
print "a,b的笛卡尔乘积:",
for x in itertools.product(a,b):
    print x[0], x[1]
print;
print "a自身的笛卡尔乘积:",
for x in itertools.product(a,a):
    print x[0], x[1]

相关文章:

  • 2021-06-14
  • 2021-08-09
  • 2021-06-10
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-03-08
  • 2021-12-23
  • 2021-04-11
  • 2021-07-08
  • 2022-12-23
相关资源
相似解决方案