Untitled
unknown
plain_text
5 months ago
242 B
3
Indexable
def generate_test_strings(max_length=10): alphabet = ['a', 'b'] all_strings = [] for length in range(max_length + 1): all_strings.extend([''.join(p) for p in itertools.product(alphabet, repeat=length)]) return all_strings
Editor is loading...
Leave a Comment