I was wondering, is there a way i can get a key by knowing its value? For example a code so you can just add the part with finding a key by its value.
ww = "the quick brown fox jumps over the lazy dog."
counts = dict()
words = ww.split()
val = []
for word in words:
if word in counts:
counts[word] += 1
else:
counts[word] = 1
for keys, values in counts.items():
val.append(int(values))
here is the code the adds the word and how many times can we meet it in the code.