나는이 질문을 이전에했지만 다른 프로그래밍 언어에 관해서 물었다.가능한 모든 조합 찾기
내가 뿌리, 접두어 및 접미사를 몇 개 가지고 있다고 가정 해 보겠습니다.
roots = ["car insurance", "auto insurance"]
prefix = ["cheap", "budget"]
suffix = ["quote", "quotes"]
파이썬에는 세 가지 문자 벡터의 가능한 모든 조합을 구성 할 수있는 간단한 함수가 있습니까?
그래서 각 문자열의 모든 가능한 조합의 다음 목록을 반환하는 목록 또는 기타 데이터 구조가 필요합니다.
cheap car insurance quotes
cheap car insurance quotes
budget auto insurance quotes
budget insurance quotes
...
중복 된 [목록의 모든 조합] (http : // stackoverflow. com/questions/798854/all-of-a-of-a-list-of-lists)를 참조하십시오. 그리고 많은 다른 사람 : http://stackoverflow.com/search?q=python+all+combinations. – FMc