Is there a function or native lib in Python that allows me to loop in a list more times than the number of elements in the list? In other words, when my index of interest is greater than the list size, the next element is the first of the list.
For example, I have this list:
abc = ['a', 'b', 'c', 'd', 'e']
So, if I have an index with value 10
, the result will be 'a'
. If the index is with value 18
, the result will be 'd'
.