Re: [Tutor] Re: Unique Items in Lists

2005-01-27 Thread Brian van den Broek
Wolfram Kraus said unto the world upon 2005-01-27 03:24: Brian van den Broek wrote: SNIP Thanks Wolfram, I knew someone would improve what I posted. (It can always be done ;-) for i in a_list: if i in items_dict: items_dict[i] = items_dict[i] + 1 else:

Re: [Tutor] Re: Unique Items in Lists

2005-01-27 Thread Kent Johnson
Brian van den Broek wrote: Wolfram Kraus said unto the world upon 2005-01-27 03:24: Brian van den Broek wrote: for key in items_dict.copy(): # Try it without the .copy() if items_dict[key] == 1:# and see what happens. del items_dict[key] dict_keys =