[Solved] Using a dictionary as an answer key for user input


First, your help_dict is not a dict, it’s a set.

Second: you’re comparing a string with a set – which of course won’t never ever compare equal. Testing if a set contains an element is done with the in operator: if something in myset: – and for non-appartenance you simply use not in. IOW, you want:

elif fileExt not in ext_dict:
   # XXXX

1

solved Using a dictionary as an answer key for user input