Implement a function in Python that prints out the contents of a given list with even indices only.
my_list = [1, 5, 10, 15, 20]
def print_even_indices(my_list):
    for i in range(len(my_list)):
        if i % 2 == 0:
            print(my_list[i])
            
print_even_indices(my_list)