Python help (List and Dictionary)


#1

I want to check every element of a list if it is in the key of a dictionary. How do I do so?

Follow up: If the element is a key in the dictionary, I want to add 1 to the value of said key.

Please help huhu


#2

is this a codecademy exercise?

What have you got so far?


#3

Sounds like you should look up list and dict operations. If something stops you from doing that then that would be something to ask about

It’s fine to ask when stuck, you’re not meant to be stuck, but this looks like all the information is already available to you.


#5

the list is not in the dictionary, you need to check if elements of list are in dictionary.


#6

Start by figuring out how to loop through the list


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.