How to store indices in a list,"['ABC', 'F']"