[BUG] syntax error in implementation of filter_non_unique
geekypandey opened this issue · 0 comments
geekypandey commented
A small syntax issue in the implementation of filter_non_unique.
from collections import Counter
def filter_non_unique(lst):
return [item for item, count in counter = Counter(lst).items() if count == 1]
I think we could implement the similar thing in python3.8 using the Walrus operator ( :=).