Generate a python program that creates a new list by appending an element to the last of an existing list.
[1, 2, 3]
def appendElementToList(list, element):
     list.append(element)
     return list

list = [1, 2, 3]
element = 4
print(appendElementToList(list, element))