Run
myrange = range(0, 20, 3) value = 12 index = myrange.index(value) print(f'Index of {value} in the range is {index}.')
Output