I have such input masked word like ---
and I want to replace all -
with numbers(0-9)
Code:
def masker(input_mask,pattern):
s = list()
s = (itertools.product(pattern,repeat=1))
for i in input_mask:
if ( i=='-'):
for j in s :
print (input_mask.replace('-',''.join(j)))
masker ('-a-' , '123')
but my output is:
1a1
2a2
3a3
1a1
2a2
3a3
And my main goal is this output:
1a1
1a2
1a3
2a1
....
....
3a3