Why can we modify list with the append method but can't do the same with the list concatenation? I know about the local and global scope, I'm confused about why we can do it with append method, thanks in advance
some_list=[]
def foo():
some_list.append('apple')
foo()
print(some_list)
#it works
with list concatenation
some_list=[]
def foo():
some_list+=['apple']
foo()
print(some_list)
#UnboundLocalError: local variable 'some_list' referenced before assignment