Python 蓝桥杯 排列 permutations()的用法 from itertools import * s = [‘a’,‘b’,‘c’] for element in permutations(s,2): a=’ '.join(element) #把所有元素拼起来 print(a)