def processItemsNotTwo_case1(list_of_nums):
    list_of_nums[:] = [x for x in list_of_nums if x != 2]

def processItemsNotTwo_case2(list_of_nums):
    list_of_nums = [x for x in list_of_nums if x != 2]
list1 = [1, 2, 2, 3, 4, 5]
processItemsNotTwo_case1(list1)
list2 = [1, 2, 2, 3, 4, 5]
Does filter,map, and reduce in Python create a new copy of list?