If I understand the question ("two or more zeroes followed" means "two or more consecutive zeroes"?), the number must have exactly 10 digits. It must not have two (or more) consecutive zeroes. It must not have three (or more) consecutive digits other than zero. (Three consecutive zeroes implies two consecutive zeroes, so that does constitute an invalid number because of the 2nd rule--we do not need to exclude zero from the last test).
That gives that code
def validate(s):
# 10 characters
if len(s) != 10:
return False
# all digits
for c in s:
if not c.isdigit():
return False
# no two or more consecutive '0'
for a,b in zip(s[0:9],s[1:10]):
if a == b == '0':
return False
# no three or more consecutive digits
for a,b,c in zip(s[0:8],s[1:9],s[2:10]):
if (a == b == c) and a.isdigit():
return False
#
return True
TESTS = (
'12345678x0', # one character not digit
'123456789', # not 10 characters
'1234567890', # valid
'1230067890', # two consecutive zeroes
'1224567890', # valid
'1114567890', # three consecutive digits (other than zero)
)
for t in TESTS:
print( t, 'valid' if validate(t) else 'not valid' )
n = raw_input("Enter number: ")
print( n, 'valid' if validate(n) else 'not valid' )