diff --git a/README.md b/README.md index 355c11e..8289fb3 100644 --- a/README.md +++ b/README.md @@ -436,6 +436,14 @@ from itertools import combinations, combinations_with_replacement, permutations, ``` ```python +>>> product([0, 1], repeat=3) +[(0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 1, 1), + (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1)] + +>>> product('ab', '12') +[('a', '1'), ('a', '2'), + ('b', '1'), ('b', '2')] + >>> combinations('abc', 2) [('a', 'b'), ('a', 'c'), ('b', 'c')] @@ -448,14 +456,6 @@ from itertools import combinations, combinations_with_replacement, permutations, [('a', 'b'), ('a', 'c'), ('b', 'a'), ('b', 'c'), ('c', 'a'), ('c', 'b')] - ->>> product('ab', '12') -[('a', '1'), ('a', '2'), - ('b', '1'), ('b', '2')] - ->>> product([0, 1], repeat=3) -[(0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 1, 1), - (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1)] ```