2. Found Ya!
by CodeChum Admin
Let's now try finding a certain digit into an integer! Come and join in on the fun and code with me!
Instructions
Input
A line containing two integers separated by a space.
1·231214238
Output
A line containing a string.
Yes
inputValues=input().split(' ')
digit=int(inputValues[0])
number=int(inputValues[1])
count=0
while number>0:
if number % 10 == digit:
count +=1
number = int(number/10)
if count>0:
print("Yes")
else:
print("No")
Comments
Leave a comment