It seems you have the wrong sample.
In my last response I removed "-1" in line 5.
In my last response I removed "-1" in line 5.
AlphaNum = "abcdefg0123456p" currentIndex = 2 replaceList = ['a', 'b', 'c', 'd', 'e'] for i in range(0, currentIndex): replaceList[i] = AlphaNum[0] for x in replaceList: print(x)
Output:a
a
c
d
e