+ 1

In one-dimensional list a=[a1, a2, ..., an] delete all equal elements, leaving only one of these equal groups. in Python

In one-dimensional list a=[a1, a2, ..., an] delete all equal elements, leaving only one of these equal groups. in Python

4th Apr 2018, 5:58 PM
Пиров Мустафо
Пиров Мустафо - avatar
2 Answers
+ 4
Probably the shortest: a = list(set(a))
4th Apr 2018, 6:03 PM
Bartosz Pieszko
Bartosz Pieszko - avatar
+ 1
thanks
4th Apr 2018, 6:19 PM
Пиров Мустафо
Пиров Мустафо - avatar