I'd like to convert a list of dicts into a set of dicts.
For example:
I have the following list:
my_list = [{k1:v1, k2:v2}, {k3:v3, k4:v4}]
I simply want to convert it easily to a set of these dicts.
As long as my lists were holding simple data like Strings, there was no problem with:
new_list = set(myList)
But if they hold dicts, they fall on
TypeError: unhashable type: 'dict'
I'd rather not iterating the list and add each item to the set. I'd rather have a straight forward method which will also support list of strings for example.
Is that possible?