python del vs delete code example Example: del vs remove python A = [1,2,3,4] del(A[1]) # A: [1,3,4] B = {9,8,7,6} B.remove("8") # B: {9,7,6}