def foo():
    global myList
myList = myList + [2, 3]

def bar():
    myList.extend([2, 3])

def baz():
    global myList
myList += [2, 3]
foo()
bar()
baz()
Python += versus .extend() inside a function on a global variable