I have a long list of email addresses (8000) sorted alphabetically but there are duplicates.
With python - how can I count the number of recurrences of a unique email (count duplicates) and while maintaining one instance of the email delete the recurring duplicate emails from the list.
example list:
a@sample.com
b@sample.com
b@sample.com
b@sample.com
c@sample.com
c@sample.com
results:
a@sample.com (1)
b@sample.com (3)
c@sample.com (2)
I've searched online, but only find methods of removing duplicate numbers, dictionaries and tuples.