user
Generate an example of using the following function.

def append_to_list(lst, element):
    lst.append(element)
    return lst


assistant
list1 = [1, 2, 3]
element = 4
append_to_list(list1, element) # returns [1, 2, 3, 4]