enveloppez la liste Python

ls[index % len(ls)]
Comfortable Caterpillar