How to store indices in a list,print([s[i] for i in index])