Sep-22-2019, 01:19 AM
Because
x in thisdict
checks against the keys of the dictionary (1, 2, and 3). You would have to check x in thisdict.values()
. Note that checking against the keys is very fast in Python, but checking against the values is probably a bit slower than using a list.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures