for i in xrange(2, x - 1):
if x % i == 0 or x < 2:
for some reason when is_prime(0) is executed it returns True? I thought my or statement takes care of this issue. I know I can specify that x cannot equal 0, but I feel like it is unnecessary space. Can someone explain why my or statement does not work?