class cyclist(list):

    def __getitem__(self, index):
        return list.__getitem__(self, index % len(self))

def __getslice__(self, start, stop):
    return [self[n] for n in range(start, stop)]
Cyclical indexing of lists in Python