The problem is simple A string like = '932152' should start with digits ( 9 or 8 or 7 ) so I used this code:
p ='932152'
if((p[0] !='7') or (p[0] != '8') or (p[0] != '9')):
print'NO'
else:
print'YES'
and I get 'NO'
Why is that? I tried each condition alone with putting it in a single if statement and it obviously working.