I am working with a piece of code (written in python) that accepts an argument of the form:
restricted_bonds = {
frozenset((0, 10)),
frozenset((3, 14)),
frozenset((5, 6))
}
I have a tuple of the form:
tupl = ((0, 5, 6, 1), (4, 5, 6, 8))
where, I want to create a frozenset which can be read as:
d = {frozenset((0, 5, 6, 1)),
frozenset((4, 5, 6, 8))
}
The idea is to be able to set restricted_bonds = d
I have tried a few variations of:
for i in tupl:
d[frozenset(i)] = ''
The ideal result will be:
d = {frozenset((0, 5, 6, 1)),
frozenset((4, 5, 6, 8))
}