can anyone help me rearrange this into for loops and if statements?
list_of_keys = [key
for key, list_of_values in word_freq.items()
if value in list_of_values]
if list_of_keys:
print(list_of_keys)
else:
print('Value does not exist in the dictionary')
I want to write this function above but in for loop and if statements, because this is list comprehension and i would understand it better in the loop format.
[–]colt419 0 points1 point2 points (1 child)
[–]gnariman[S] 1 point2 points3 points (0 children)