Dan Dan - 1 year ago 63
Python Question

Counting the Number of keywords in a dictionary in python

I have a list of words in a dictionary with the value = the repetition of the keyword but I only want a list of distinct words so i wanted to count the number of keywords. Is there a to count the number of keywords or is there another way I should look for distinct words?

Answer Source

or just


If you like to count unique words in the file, you could just use set and do like