我有一个清单
[
[[[u'ANC'], [u'DEN', u'SFO'], [u'CHI', u'CLE', u'DEN', u'EWR', u'HOU', u'WAS'], [u'GSP']]],
[[[u'ANC'], [u'PDX', u'SEA'], [u'CHI', u'CLE', u'DEN', u'EWR', u'HOU', u'LAX', u'SFO', u'WAS'], [u'GSP']]]
]
列表已从此文本创建
ANC-DEN/SFO-CHI/CLE/DEN/EWR/HOU/WAS-GSP
ANC-PDX/SEA-CHI/CLE/DEN/EWR/HOU/LAX/SFO/WAS-GSP
我需要获取可以使用该列表完成的所有变体:
ANC-SFO-EWR-GSP
ANC-SFO-CHI-GSP
ANC-SFO-CLE-GSP
ANC-DEN-EWR-GSP
ANC-PDX-EWR-GSP
ANC-SFO-HOU-GSP
ANC-SEA-LAX-GSP
ANC-SEA-EWR-GSP
ANC-SFO-ORD-GSP
ANC-PDX-LAX-GSP
ANC-PDX-CHI-GSP
ANC-DEN-CHI-GSP
ANC-SEA-SFO-GSP
ANC-PDX-SFO-GSP
ANC-SEA-CHI-GSP
ANC-SFO-DEN-GSP
ANC-PDX-HOU-GSP
ANC-SEA-HOU-GSP
ANC-DEN-HOU-GSP
ANC-DEN-CLE-GSP
ANC-PDX-CLE-GSP
ANC-SEA-CLE-GSP
ANC-DEN-ORD-GSP
ANC-PDX-ORD-GSP
ANC-PDX-DEN-GSP
ANC-SEA-DEN-GSP
ANC-SEA-ORD-GSP
我该怎么做呢?