Is there a way to check if a integer contains a certain number in python -



Is there a way to check if a integer contains a certain number in python -

i have been trying check if integer has number in not number. far have tried , doesn't work. help?

while x == int (10) false or x == int(20) false:

but no matter number entered comes out false

you want compare x directly, nil fancy:

while x != 10 or x != 20:

which true, because no matter value x has, 1 of 2 inequalities hold. x cannot 10 , 20 simultaneously. want

while x != 10 , x != 20:

or equivalent

while not (x == 10 or x == 20):

python

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

ubuntu - Bash Script to Check That Files Are Being Created -

Php operator `break` doesn't stop while -