Untitled

mail@pastecode.io avatar
unknown
python
a year ago
222 B
2
Indexable
from itertools import product

variants = list(product('123456', repeat=3))

counter = 0

for var in variants:
    total = sum(int(i) for i in var)
    if total == 6:
        counter += 1
        
print(counter)