I am a newbie in Python. I am making a program where I take a input from user and check if any number is inside in the string. I am checking it by taking it in a variable. Is it not correct to check via a VARIABLE?
user_string=input("Enter the Word:")
print (user_string)
for index in (0,9):
    number=str(index)           #Typecasting Int to String 
    if number in user_string:   #Check if Number exist in the string
    print ("yes")
output:
Enter the Word:helo2
helo2
 
     
    