Это набор данных:
data=[(frozenset({'I1'}), frozenset({'I2'})), (frozenset({'I1'}), frozenset({'I3'})), (frozenset({'I1'}), frozenset({'I4'})), (frozenset({'I2'}), frozenset({'I3'})), (frozenset({'I2'}), frozenset({'I4'})), (frozenset({'I3'}), frozenset({'I4'}))]
, и я хочу, чтобы он преобразовал его в список, как показано ниже:
[ frozenset({'I1','I2'}), frozenset({'I1','I3'}),...]
пробное преобразование
data=[(frozenset({'I1'}), frozenset({'I2'})), (frozenset({'I1'}), frozenset({'I3'})), (frozenset({'I1'}), frozenset({'I4'})), (frozenset({'I2'}), frozenset({'I3'})), (frozenset({'I2'}), frozenset({'I4'})), (frozenset({'I3'}), frozenset({'I4'}))]
for x in data:
for y in x:
#tests
это то, что я пытаюсь сделать
[ frozenset({'I1','I2'}), frozenset({'I1','I3'}),...]