I learned that list slicing returns a new list instance. So I think this code wouldn't work, since b[:] is different to b instance. However, the result is 5, and it means list second copied list first. I'm confused about slicing. Doesn't it return a new instance?
def copy(a,b):
b[:] = a[:]
first = [1, 2, 3, 4, 5]
second = []
copy(first,second)
print second[-1]