Write a Python program which prints the index of the given value in a list.
my_list = [2, 4, 6, 8]
value = 4
def find_index(my_list, value):
    for i in range(len(my_list)):
        if my_list[i] == value:
            return i