Check whether a number is positive, negative, or zero
We should use the comparison operators.  Greater than, less than.

if dif &gt; 0:
    print 'Player wins!'
elif dif &lt; 0:
    print 'Computer wins!'
else:
    print 'Player and computer tie!'


Another option, which I'm led to believe is "more Pythonic" (although, I'm not a Python dev, so don't take my word for it...), looks like this:

def tie():
    print 'Player and computer tie!'

def player():
    print 'Player wins!'

def computer():
    print 'Computer wins!'

options = {
     0 : tie,
     1 : player,
     2 : player,
     3 : player,
     4 : player,
    -1 : computer,
    -2 : computer,
    -3 : computer,
    -4 : computer
}

options[dif]()


If explicit values are important, than this solution is probably good.  However, if you really only care whether a value is greater than, less than, or equal to a specific value, than a simple if/elif/else as I first demonstrated is a good option.

Note that this bottom option will run into a KeyError if dif is not in the range of expected values.  The if/elif/else will work for any number.