python排列组合
import itertools for i in itertools.combinations(\'12345\', 4): print(i,\" \") print(i[0]) print(\'\\n\')
(wind_2021) F:\\PytorchProject\\yolov5-master> (wind_2021) F:\\PytorchProject\\yolov5-master>python test_combination.py (\'1\', \'2\', \'3\', \'4\') 1 (\'1\', \'2\', \'3\', \'5\') 1 (\'1\', \'2\', \'4\', \'5\') 1 (\'1\', \'3\', \'4\', \'5\') 1 (\'2\', \'3\', \'4\', \'5\') 2 (wind_2021) F:\\PytorchProject\\yolov5-master> (wind_2021) F:\\PytorchProject\\yolov5-master>
##############
来源:https://www.cnblogs.com/herd/p/15969161.html
本站部分图文来源于网络,如有侵权请联系删除。