I used the following method to remove duplicate items in a list and
got confused by the error.
[color=blue][color=green][color=darkred]
>>> a[/color][/color][/color]
[[1, 2], [1, 2], [2, 3]][color=blue][color=green][color=darkred]
>>> noDups=[ u for u in a if u not in locals()['_[1]'] ][/color][/color][/color]
Traceback (most recent call last):
File "<interacti ve input>", line 1, in ?
TypeError: iterable argument required
got confused by the error.
[color=blue][color=green][color=darkred]
>>> a[/color][/color][/color]
[[1, 2], [1, 2], [2, 3]][color=blue][color=green][color=darkred]
>>> noDups=[ u for u in a if u not in locals()['_[1]'] ][/color][/color][/color]
Traceback (most recent call last):
File "<interacti ve input>", line 1, in ?
TypeError: iterable argument required
Comment