List

Mutable datatype

Ordered heterogeneous elements

list_a = [1, 2, 3]
list_a.append(4) # [1, 2, 3, 4]
list_a.insert(2, 'new') # [1, 2, 'new', 3, 4]
list_a.pop() # 6
list_a.index('new') # 2
list_a.count(1) # 1 

Tuple

Immutable datatype

Ordered heterogeneous elements

tuple_a = (1, 2, 3)
tuple_a[2] = 4 # error
tuple_b = ([1, 2, 3], 4)
tuple_b[0][1] = 5 # ([1, 5, 3], 4) 

Set

Mutable datatype

Unordered collection and no duplicates

set_a = {1, 2, 3}
set_b = {2, 3, 4}
set_a | set_b # {1, 2, 3, 4}
set_a & set_b # {2, 3}
set_a - set_b = {1}

Dictionary

Mutable datatype

Store data in the form of key and value

my_dict = {}
my_dict['name'] = "bob" # {'name': "bob"}
tuple_a = (1, 2)
my_dict[tuple_a] = "element" # {'name': "bob", (1, 2): "element"}
list_a = [1, 2]
my_dict[list_a] = "element_2" # error