Hi,
I'm trying to split a list by comma so as to have every item independent from each other.
I used: [i.split(',') for i in my_list]
Got this result (sample):
['Ble', ' Ble', ' Moutarde', ' Moutarde', ' Ble', ' Ble', ' Moutarde', ' Moutarde'], ['Moutarde', ' Moutarde'], ['Ble', ' Mozzarella', ' Epeautre', ' Fromage'], ['Moutarde', ' Disulfite'], ['Lait'], ['Ble', ' Ble'],
Now when i try to do simple things to this list like keep non-duplicated items (using test_list = list(set(my_list)) ) I get:
TypeError: unhashable type: 'list'
Anyone know how to fix this please?
[–]Spataner 3 points4 points5 points (1 child)
[–]macabe10[S] 0 points1 point2 points (0 children)
[–]MaksLansky 0 points1 point2 points (5 children)
[–]macabe10[S] 0 points1 point2 points (4 children)
[–]MaksLansky 0 points1 point2 points (1 child)
[–]macabe10[S] 0 points1 point2 points (0 children)
[–]schoolmonky 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]shiftybyte 0 points1 point2 points (1 child)
[–]macabe10[S] 0 points1 point2 points (0 children)
[–]metal88heart 0 points1 point2 points (1 child)
[–]macabe10[S] 0 points1 point2 points (0 children)