1# Simple example:
2
3list_ex = [1, 2, 3, 4]
4list_set = set(list_ex)
5
6# Printing the newly-created set should yield the following result:
7# {1, 2, 3, 4}
8
9# If you have a matrix (list of lists), you can convert
10# it to a set by following this example:
11matrix_ex = [[1, 2], [3, 4], [5, 6]]
12matrix_set = {e for l in matrix_ex for e in l}