곱집합
-
[Python] itertools을 이용한 곱집합 만들기Python/Python Programming 2019. 9. 27. 19:51
import itertools string1 = 'abc' string2 = 'ABC' string3 = '012' for x in itertools.product(string1,string2,string3): print(x) ------------------------------------------------------ ('a', 'A', '0') ('a', 'A', '1') ('a', 'A', '2') ('a', 'B', '0') ('a', 'B', '1') ('a', 'B', '2') ('a', 'C', '0') ('a', 'C', '1') ('a', 'C', '2') ('b', 'A', '0') ('b', 'A', '1') ('b', 'A', '2') ('b', 'B', '0') ('b', 'B..