I\'m having some trouble figuring out how to slice python lists, it is illustrated as follows:
>>> test = range(10)
>>> test
[0, 1, 2, 3, 4
What you are looking for is to use something like:
inputs = "ababbbaAab"
for i in range(n):
print(i, inputs[:i] + inputs[i:i+1])
The output:
0 a
1 ab
2 aba
3 abab
4 ababb
5 ababbb
6 ababbba
7 ababbbaA
8 ababbbaAa
9 ababbbaAab
See that if i == 0
then inputs[:i] == []
and inputs[i:i+1] == a
and if i == len(inputs) - 1
then inputs[:i] == [ababbbaAa]
and inputs[i:i+1] == b