Hey, I currently have a long list of items, many of which occurs multiple times. I would like to transform it to a shorter list which contains each unique item + the number of occurences.
First of all, thank you for the warm welcome and your reply!
Yes this is a great beginning of what I’d like to do. Now when the elements are sorted I’d like to know the amount of instances in each sublist.
Instead of a list of sublists I want a list with numbers, [30,14,7,24…] and so forth.
Oh, yours seem to work exactly like I need it to. I was just confused because my list.count only gives me the amount of sublists like such.
Thanks for your continued support!
1 Like
Yes! Thank you, should have consulted you long ago Thanks for the help!!
Haha glad I could help!
1 Like