-1

Suppose I have a series of numbers of 14 digits. I know the 10 digits and the remaining 4 were from 2,3,0,8 and 9. I also know the order means on which index the 4 digits have to be placed. I want to make a python program for finding all the possible combinations. Example: 14-digit series were like 001_ 010_1 83__4 the blank spaces can be from either 2,3,0,8 or 9. I want to know all the possible combinations.

Acode
  • 1
  • 1

1 Answers1

-1
from itertools import combinations

numbers = ["1", "2", "3", "4", "5", "6"]

num_per_combos = 3

combos = list(combinations(school_subjects, num_per_combos))

for lists in combos:
    for combo in lists:
        print(combo + " ")
    print("\n")
deadshot
  • 8,881
  • 4
  • 20
  • 39