This code generates the list of all permutations:

```
 def permute(xs, low=0):
    if low + 1 >= len(xs):
        yield xs
    else:
        for p in permute(xs, low + 1):
            yield p        
        for i in range(low + 1, len(xs)):        
            xs[low], xs[i] = xs[i], xs[low]
            for p in permute(xs, low + 1):
                yield p        
            xs[low], xs[i] = xs[i], xs[low]

for p in permute(['A', 'B', 'C', 'D']):
    print p

```

What I would like to do create an index for the list of permutations so that if I call a number I can access that particular permutation. 

For example:

```
if index.value == 0:
    print index.value # ['A','B','C','D']
elif index.value == 1:
    print index.value # ['A','B','D','C']
#...

```

I am new to Python, thank you in advance for any guidance provided.