Example 1: Using set()
list_1 = [1, 2, 1, 4, 6]
print(list(set(list_1)))
Example 2: Remove the items that are duplicated in two lists
list_1 = [1, 2, 1, 4, 6]
list_2 = [7, 8, 2, 1]
print(list(set(list_1) ^ set(list_2)))
Using decode() print(b'Easy \xE2\x9C\x85'.decode("utf-8"))
0 Comments