You can divide this problem into two steps. First, figuring out all possible subsets of positions that should be repeated. That is essentially a powerset taken from here with the empty case removed. Building it off of indices allows the solution to be robust against words that contain repeated letters for repetition.
Second, for each case in the powerset, build a valid string and display it.
from itertools import chain, combinations
def powerset_non_empty(iterable):
"""
powerset with empty set skipped
powerset([1,2,3]) --> (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)
"""
xs = list(iterable)
# note we return a list, but could choose to return an iterator too
return list(chain.from_iterable(combinations(xs,n) for n in range(1, len(xs)+1)))
l = ['a', 'l', 'e']
word = "apple"
indices = [i for i,c in enumerate(word) if c in l]
number_of_repetition = 3
powerset = powerset_non_empty(indices)
result = []
for index_tuple in powerset:
s = ''
for i, c in enumerate(word):
if i in index_tuple:
s += (number_of_repetition * c)
else:
s += c
print(s)
result.append(s)
#Output:
['aaapple',
'appllle',
'appleee',
'aaappllle',
'aaappleee',
'appllleee',
'aaappllleee']