Question: 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)

```

Answer: 
You can easily find the index of the matching item using the `index` method of sequences:

```
choices=('a','b','c','d')
test=raw_input('enter letter: ')
if test in choices:
    index = choices.index(test)
    # do something based on index

```

(I changed the name of the variable named `list` in your sample code to `choices` because `list` is the predefined name of a fundamental type in Python -- besides that, the variable actually contains a tuple of values, not a list of them because they're enclosed in parentheses instead of square brackets.)

The `if test in choices:` tells you quickly if the value assigned to `test` is equal to any of those in `choices`. The `index()` method does essentially the same thing but also tells you the index of which one. One important difference between them is that when the value isn't in the sequence, the `index()` method will throw a `ValueError`, whereas the `in` operator will just return `False` if there's no match.

Since they're so similar, it's uncommon (as well as inefficient) to use them both as shown.

From the rest of your code it looks like perhaps what you *really* wanted to know is a good way of dispatching based on the value of `test`. As many of the other answers indicate, this is often done with a dictionary in Python since it has no `switch` or `case:` statement found in other programming languages.

To add to the other examples, here's a somewhat novel way to build and use one (a dictionary) on-the-fly:

```
def func_a(): pass
def func_b(): pass
def func_c(): pass
def func_d(): pass

test = raw_input('enter letter: ')
try:
    {'a': func_a,
     'b': func_b,
     'c': func_c,
     'd': func_d,
    }[test]()  # call corresponding function
except KeyError:
    # handle other values of test
    ...

```

Another alternative, since the names of the `func_x`'s defined are all global variables, which allows you to avoid even having to build your own dictionary, would be to just use the one returned by the built-in `globals()` function instead:

```
test = raw_input('enter letter: ')
try:
    globals()['func_'+test]()  # call appropriately named function
except KeyError:
    # handle illegal values of test
    ...

```
While you can do things with dictionaries to emulate a switch statement, for only a few items (4 in this case), there's nothing wrong with using `if` statements

You could use the `elif` statement (short for "else if"), to make it clear only one of the branches will be executed (e.g if it matches "a", there's no point checking c, and d).

Also the initial `if test in mylist:` check seemed redundant in your example code

So it can be simplified to:

```
things=('a','b','c','d')
test=raw_input('enter letter')

if test == "a":
    code("was called with 'a'!")
elif test == "b":
    code("was called with 'b'!")
elif test == "c":
    code("was called with 'c'!")
elif test == "d":
    code("was called with 'd'!")
else:
    # Optional else block, executed if the input wasn't a, b, c or d
    print "Uhoh"

```