I am writing in Python
I have a list of tuples called 'positions'. Some of these tuples have more than 1 occurence in 'positions'. I want to create a dictionary named d with the code:
d["positions"] = dict.fromkeys(positions)
This gives me a dictionary as expected, with every value of every key equal to None. But now I want those values to be equal to the amount of times that the tuple occurs in 'positions'. Is this possible without having to iterate over the list 'positions' or without using something like positions.count(x)?
Alex