Python kontratak do listy krotek
from collections import Counter
result = list(Counter(example).items())
[('apple', 2), ('pear', 1)]
Plif Plouf
from collections import Counter
result = list(Counter(example).items())
[('apple', 2), ('pear', 1)]