I have a list of four colors which I want to generate an infinite list such that when I enter a random index, it will show me the color found in that position
number = int(input('write your index here:'))
color = ['b', 'k', 'g', 'y']
chosen_color = color[number%len(color)]
print(chosen_color)
Output:
write your index here: 98435164
b