Create a function in Python that prints each element of a list one by one.
list1 = [1,2,3,4,5]
def print_list(list1):
    for element in list1:
        print(element)

list1 = [1,2,3,4,5]

print_list(list1)