I want to check if an input value is equal a value inside the list without going through every value inside the list.
list=('a','b','c','d')
test=raw_input('enter letter')
if test in list:
if test == a:
(code)
if test == b:
(code)
if test == c:
(code)
if test == d:
(code)
This is better done with a dictionary.
Of course, if code is the same in each case, you could do:
which is functionally equivalent to:
or, more simply: