Using Python, I’m trying to print out a table, with collated information based on a set of data like this.
Data 1 - 'Car', 'Cadillac','Blue'
Data 2 - 'Car', 'Aston Martin','Black'
Data 3 - 'Car', 'Cadillac', 'Blue'
Now I need to find the number of times the same combination occurs – i.e. I would like to print that the combination of 'Car', 'Cadillac' and 'Blue' occurs twice, and the other, once. How do I do this in Python?
EDIT: I’m using Python 2.4!
First tuple the string and put it all in a list; then use
count