GTXY20 wrote: > > This works perfectly. > > However I will be dealing with an import of a very large dictionary - if > I call the commands at command line this seems to be very taxing on the > CPU and memory and will take a long time. > > I was thinking of creating each as a fucntion whereby python would just > to write to a file instead of calling within a python shell do you think > that this would speed up the process?
I don't understand what you are suggesting. Both of your requirements just need the values of the dict. If the dict is being created from a file, you could probably build the count dicts on the fly as you read the values without ever creating the dict with all the items in it. Kent > > All in total I will probably be looking at about 2 million dictionary > keys with assorted value quantities. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor