A
A
Arseniy Khusainov2021-07-29 19:50:38
Python
Arseniy Khusainov, 2021-07-29 19:50:38

How can all variants be generated from characters?

Here are the characters: 1234567890
Of these, you need to make all options with a size of 3 or more characters, for example: 000,100,200, etc.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sswwssww, 2021-07-29
@halwarsing

from itertools import product

print(list(product('1234567890', repeat=3)))

Or choose what you need from itertools:
6102de6dc9187232680731.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question