你需要类似的东西
In [5]: deck = []
In [6]: for i in itertools.combinations(suits, 2):
...: for j in cards:
...: deck.append(j+i[0]+j+i[1])
...:
In [7]: print deck
['2h2c', '3h3c', '4h4c', '5h5c', '6h6c', '7h7c', '8h8c', '9h9c', 'thtc', 'jhjc', 'qhqc', 'khkc', 'ahac',
', '3h3d', '4h4d', '5h5d', '6h6d', '7h7d', '8h8d', '9h9d', 'thtd', 'jhjd', 'qhqd', 'khkd', 'ahad', '2h2s'
3s', '4h4s', '5h5s', '6h6s', '7h7s', '8h8s', '9h9s', 'thts', 'jhjs', 'qhqs', 'khks', 'ahas', '2c2d', '3c3
4c4d', '5c5d', '6c6d', '7c7d', '8c8d', '9c9d', 'tctd', 'jcjd', 'qcqd', 'kckd', 'acad', '2c2s', '3c3s', '4
'5c5s', '6c6s', '7c7s', '8c8s', '9c9s', 'tcts', 'jcjs', 'qcqs', 'kcks', 'acas', '2d2s', '3d3s', '4d4s',
', '6d6s', '7d7s', '8d8s', '9d9s', 'tdts', 'jdjs', 'qdqs', 'kdks', 'adas']