Write a Python program to get a slice of elements from a list.
mylist = [1,2,3,4,5,6]
def get_slice(mylist, start, end):
    return mylist[start:end]

result = get_slice([1,2,3,4,5,6], 2, 5)
print(result)