I need to build a dictionary from a list with the size of about 3 million items, right now I am using the code below but it is running for more than 12 hours and still not done. I was wondering whether there is a faster way?. This is the code I am using right now:
my_dict = {i:obj_id.count(i) for i in obj_id}